Use with the following
- react-router
- redux-form
You must use this compontent on the route component where the form is shown not on the form component itself.
This is because this.props.route
is only added to route components, and I didn't want to pass that down through props.
Inspired by this Codepad
Feedback appreciated
- Accept an array of form names
Exactly what I was looking for without having to code it myself. Thanks.
Just a suggestion, but I think this would be a really useful module to have in npm.
redux-form-navwarning
or something.Although actually it's specific to react-router, which would be nicer if it was configurable.