This experiment enables defining a custom HTTP response resolution
for requests that aren't made by the use... hooks created by the
library.
This allows people to re-use the logic in forms, which mean that people
can have progressive enhancement in their forms: if JS is not loaded,
you can submit the form "as is", and once JS is loaded, you will fire an
SWR mutation request. I think it's cool.
The only thing I'm not sure about is the API. This commit enables the
following API:
This issue always provides a useForm(mutationHook): { formProps } function that eases form creation by returning the props necessary for forms to be used with SWR mutations for progressive enhancement
This experiment enables defining a custom HTTP response resolution for requests that aren't made by the
use...
hooks created by the library.This allows people to re-use the logic in forms, which mean that people can have progressive enhancement in their forms: if JS is not loaded, you can submit the form "as is", and once JS is loaded, you will fire an SWR mutation request. I think it's cool.
The only thing I'm not sure about is the API. This commit enables the following API:
This makes sense, but:
This issue always provides a
useForm(mutationHook): { formProps }
function that eases form creation by returning the props necessary for forms to be used with SWR mutations for progressive enhancement