Forest.js Core Documentation - v1.2.3
    Preparing search index...

    Type Alias RouteStatus

    RouteStatus: "idle" | "loading" | "notFound" | "success"

    Represents the possible states of a route. Used to indicate the current status of the router or route.

    • "idle": Router is initializing or in an idle state.
    • "loading": Route is currently loading.
    • "notFound": Requested route was not found.
    • "success": Route loaded successfully.
    const { routerStore } = createRouter();

    const app = createForest("#app", () => addChild({ routerStore }, ({ routerStore }) =>
    routerStore.status === "loading" ? LoadingComponent() : MainComponent()
    )(tree("div")));