smolter
Types

SubmitOptions

Method options for imperative mutations.

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 SubmitOptions {
  method?: "POST" | "PUT" | "PATCH" | "DELETE";
}

Usage

Method options for imperative mutations. Methods are uppercase POST, PUT, PATCH, and DELETE. The default is POST. For GET reads, use navigate or fetcher.load.

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

Fields

method

method?: "POST" | "PUT" | "PATCH" | "DELETE";
View implementation ↗