@mateothegreat/svelte5-router - 2.15.3
    Preparing search index...

    Class RouterInstanceConfig

    The configuration for a new router instance.

    This class should rarely be used directly. Instead, use the Router component to create a new router instance.

    Index

    Constructors

    Properties

    basePath?: string

    The base path for the router instance.

    If no value is provided, the base path will be "/".

    hooks?: { post?: Hook | Hook[]; pre?: Hook | Hook[] }

    Hooks to be run before and after the routes are rendered at the router level (independent of the route hooks if applicable).

    If no value is provided, no hooks will be run.

    id?: string

    The id for the router instance.

    If no value is provided, the id will be a random string of characters.

    initialPath?: string

    The initial path for the router instance.

    If no value is provided, the initial path will be the current path of the browser.

    notFoundComponent?: Component<any>

    The not found component for the router instance.

    If no value is provided and no route could be found, the router will will not render anything.

    renavigation?: boolean

    Whether to allow the same route to be rendered if the conditions are the same (taking in to account the path, query, and status code).

    routes: RouteConfig[]

    The routes for the router instance.

    statuses?: Statuses

    The default components rendered when a route is not found and the status code is in one of the following: 400, 401, 403, 404, 500

    If no value is provided, the default components will not be rendered.

    Methods