Skip to content

Commit 55e1d27

Browse files
committed
Update docs
1 parent 9c48bb8 commit 55e1d27

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

docs/start/data/custom.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,13 @@ Routes can take most of their definition lazily with the `lazy` property.
5959
createBrowserRouter([
6060
{
6161
path: "/show/:showId",
62-
lazy: () => {
63-
let [loader, action, Component] = await Promise.all([
64-
import("./show.action.js"),
65-
import("./show.loader.js"),
66-
import("./show.component.js"),
67-
]);
68-
return { loader, action, Component };
62+
lazy: {
63+
loader: async () =>
64+
(await import("./show.loader.js")).loader,
65+
action: async () =>
66+
(await import("./show.action.js")).action,
67+
Component: async () =>
68+
(await import("./show.component.js")).Component,
6969
},
7070
},
7171
]);

0 commit comments

Comments
 (0)