Properties of the current route. Represents the state and metadata associated with a specific route.
const { routerStore } = createRouter();const app = createForest("#app", () => addChild({ routerStore }, ({ routerStore }) => { const { path, state, status } = routerStore; // <- "routerStore" is a RouterProps if (status === "loading") { return LoadingComponent(); } else if (path === "/") { return HomeComponent(); } else if (path === "/about") { return AboutComponent(); } return NotFoundComponent();})(tree("div"))); Copy
const { routerStore } = createRouter();const app = createForest("#app", () => addChild({ routerStore }, ({ routerStore }) => { const { path, state, status } = routerStore; // <- "routerStore" is a RouterProps if (status === "loading") { return LoadingComponent(); } else if (path === "/") { return HomeComponent(); } else if (path === "/about") { return AboutComponent(); } return NotFoundComponent();})(tree("div")));
Type of state data associated with the route.
The current path of the router.
The state data associated with the current route.
The current status of the route.
Properties of the current route. Represents the state and metadata associated with a specific route.
Example