smolter
Types

LoaderSource

A route module or function accepted by data-hook inference.

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

type LoaderSource = RouteModule | AnyDataFunction;

Usage

A route module or function accepted by data-hook inference. A function is typically supplied with typeof; a typed route can be passed as the actual hook argument.

const data = useLoaderData<typeof loader>();
View implementation ↗