smolter
Types

FetcherSubmitOptions

Combines the uppercase mutation method with an optional action URL.

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 FetcherSubmitOptions extends SubmissionOptions {
  action?: string;
}

Usage

Combines the uppercase mutation method with an optional action URL. This is the second argument of the hook fetcher.submit; imperative core fetcher.submit instead receives its target URL as the first argument.

await fetcher.submit(formData, { action: "/tasks/1", method: "PATCH" });

Fields

action

action?: string;
View implementation ↗