smolter
Types

ApplicationProps

Router, root data and document composition for RouterApplication.

Compatibility

ReactAvailable in this renderer's browser integration.
React SSRAvailable to this renderer's SSR integration; browser event handlers run after hydration.
PreactAvailable in this renderer's browser integration.
Preact SSRAvailable to this renderer's SSR integration; browser event handlers run after hydration.

Import from @kasperrt/smolter/react @kasperrt/smolter/preact

Signature

interface ApplicationProps extends ApplicationContext {
  document?: boolean;
  rootStore?: ReturnType<typeof createStore>;
}

Application context

Pass a request-scoped router, its route table and initial root loader data. rootModule supplies the layout and root error boundary. document renders the full Layout; omit it when rendering into a container. A rootStore lets custom integrations publish root refreshes. Prefer mountApplication and renderApplication for the complete browser/server setup.

import type { ApplicationProps } from "@kasperrt/smolter/react";

const props: ApplicationProps = { router, routes, root: initialRoot };

Fields

document

document?: boolean;

rootStore

rootStore?: ReturnType<typeof createStore>;
View implementation ↗