react-router-form
react-router-form copied to clipboard
Write documentation
Some things that can only be found in the source code atm:
Optional Properties
-
component: what HTML component to render as the enclosing<form>. Defaults toform. -
dataKey: what key to place extracted form data in, i.e.location.state[dataKey]. Defaults tobody. -
extractFormData: function to use to extract form data into JS object. Receivesevent.target. Defaults toget-form-data. -
methodKey: what key to place extracted form submission method in, i.e.location.state[methodKey]. Defaults tomethod. -
onSubmit: function to run on form submission. Receives(event, formData)whereeventis the SyntheticEvent andformDatais the extracted form data (seeextractFormData). Defaults tonull.