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
Create just a simple Form component, imported from the react-router library.
Observe that of all the options provided when choosing an encType, application/json is not provided.
Expected Behavior
To be able to set the encType on my Form to "application/json"
Actual Behavior
The encType property within the SubmitOptions type is of type FormEncType. This type also includes the "application/json" type. However for some reason this option does not propagate to a react router Form.
The text was updated successfully, but these errors were encountered:
This is by design because the <Form> component is intended to progressively enhance <form> and be able to fallback to a working version when JS is disabled - and <form> doesn't support application/json. By using application/json you're making the choice that your app will not work without/before JS (which is a fine decision if needed!) - but you then just need to do it via the JS-required API of onClick/submit.
What version of React Router are you using?
18.2.0
Steps to Reproduce
Expected Behavior
To be able to set the encType on my Form to "application/json"
Actual Behavior
The
encType
property within theSubmitOptions
type is of typeFormEncType
. This type also includes the "application/json" type. However for some reason this option does not propagate to a react router Form.The text was updated successfully, but these errors were encountered: