Skip to content

Commit 09ff7a0

Browse files
committed
docs: update "Current Future Flags"
1 parent 315c808 commit 09ff7a0

File tree

1 file changed

+29
-2
lines changed

1 file changed

+29
-2
lines changed

docs/upgrading/future.md

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,34 @@ createBrowserRouter(routes, {
200200
});
201201
```
202202

203-
## v7_skipActionStatusRevalidation
203+
**Update your Code**
204+
205+
With partial hydration, you need to provide a `HydrateFallback` component to render during initial hydration. Additionally, if you were using `fallbackElement` before, you need to remove it as it is now deprecated. In most cases, you will want to reuse the `fallbackElement` as the `HydrateFallback`.
206+
207+
👉 **Replace `fallbackElement` with `HydrateFallback`**
208+
209+
```diff
210+
const router = createBrowserRouter(
211+
[
212+
{
213+
path: "/",
214+
Component: Layout,
215+
+ HydrateFallback: Fallback,
216+
// or
217+
+ hydrateFallbackElement: <Fallback />,
218+
children: [],
219+
},
220+
],
221+
);
222+
223+
224+
<RouterProvider
225+
router={router}
226+
- fallbackElement={<Fallback />}
227+
/>
228+
```
229+
230+
## v7_skipActionErrorRevalidation
204231

205232
<docs-warning>If you are not using a `createBrowserRouter` you can skip this</docs-warning>
206233

@@ -211,7 +238,7 @@ When this flag is enabled, loaders will no longer revalidate by default after an
211238
```tsx
212239
createBrowserRouter(routes, {
213240
future: {
214-
v7_skipActionStatusRevalidation: true,
241+
v7_skipActionErrorRevalidation: true,
215242
},
216243
});
217244
```

0 commit comments

Comments
 (0)