You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
because I often miss the second parameter and get stuck for a while. Even when I remembered, I wonder if it was { method: 'POST' } or { method: 'post' }. This new API would simplify the mental model around fetcher.
I imagine majority of use cases will be around post, but while we're at it we could also apply it to GET, PUT, PATCH, DELETE.
We could also extend the matter to useSubmit to take an option at instantiating to bind the default options.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Here I'm proposing
to be a syntax sugar for
because I often miss the second parameter and get stuck for a while. Even when I remembered, I wonder if it was
{ method: 'POST' }
or{ method: 'post' }
. This new API would simplify the mental model around fetcher.I imagine majority of use cases will be around
post
, but while we're at it we could also apply it toGET
,PUT
,PATCH
,DELETE
.We could also extend the matter to
useSubmit
to take an option at instantiating to bind the default options.Beta Was this translation helpful? Give feedback.
All reactions