We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9c48bb8 commit 55e1d27Copy full SHA for 55e1d27
docs/start/data/custom.md
@@ -59,13 +59,13 @@ Routes can take most of their definition lazily with the `lazy` property.
59
createBrowserRouter([
60
{
61
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 };
+ lazy: {
+ loader: async () =>
+ (await import("./show.loader.js")).loader,
+ action: async () =>
+ (await import("./show.action.js")).action,
+ Component: async () =>
+ (await import("./show.component.js")).Component,
69
},
70
71
]);
0 commit comments