ActionData
The inferred awaited action result.
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 ActionData<T> = T extends AnyDataFunction
? RouteData<T>
: T extends RouteModule
? RouteData<Extract<T["action"] | T["clientAction"], AnyDataFunction>>
: RouteData<T>;Usage
The inferred awaited action result. For a module it combines action and clientAction results. Page action hooks and independent fetchers store results separately.
type Saved = ActionData<typeof action>;