score:2
first, mapstatetoprops is not something exclusive to redux form, it is from redux/react-redux.
the problem with your code is that you are passing the signin component to the connect function, and not the redux-form's hoc component you've just created.
let signinform = reduxform(
{ form: "signinform" })(signin);
export default signinform = connect(mapstatetoprops, null)(signin);
signin
is not a redux-form component so it will not have the handlesubmit
function.
what you want is this:
export default connect(mapstatetoprops, null)(signinform);
score:1
the issue here is that you're passing your original component to connect
.
const reduxformsigninform = reduxform({ form: "signinform" })(signin);
const connected reduxformsigninform = connect(mapstatetoprops)(reduxformsigninform);
an alternate way to write this would be to use compose
, which you can import from redux.
import { compose } from 'redux';
export default compose(
connect(mapstatetoprops),
reduxform({ form: "signinform" })
)(signin);
Source: stackoverflow.com
Related Query
- Redux Form: MapStateToProps is breaking form
- How to initiallize values in a redux form using mapStateToProps from a custom JSON as prop?
- Redux Form way of changing one Field's value based on another Field without breaking Form Initialisation (based on values)
- React + Redux - What's the best way to handle CRUD in a form component?
- Redux state is undefined in mapStateToProps
- How to reset initial value in redux form
- Redux Form - initialValues not updating with state
- Error withRef is removed. To access the wrapped instance, use a ref on the connected component when using Redux Form
- Redux form defaultValue
- Set value in field in redux form
- How do you pass in a dynamic form name in redux form?
- Submit button from outside Redux Form v6.0.0
- Pass custom props to Redux Form Field in TypeScript
- Form input using Redux Form not updating
- Implementing Invisible reCAPTCHA with Redux Form
- React Redux -- can I make mapStateToProps only take in part of the state?
- Redux with React-Native and mapStateToProps
- How to pass values from on component to Redux form
- React Redux - Why mapStateToProps is called before constructor?
- How to export mapStateToProps and Redux Form?
- How to connect simple Formik form with Redux store and dispatch an action?
- Dynamically load initialValues in Redux Form
- Correct type declaration for mapStateToProps of Redux connect (TypeScript 2)
- Auto save form fields in react and redux
- How to get Redux Form data in another Component
- Redux form with self creating inputs
- How to use Redux Form Wizard with permanent URLS per page
- Redux form props & typescript
- Redux - Understanding advanced mapStateToProps returning a function
- How to use React refs to focus a Redux Form field?
More Query from same tag
- Next.js: getStaticPaths for nested dynamic routes
- Toasty does not autoclose or manual close after hook list
- Loading state does not change to true in fetch method
- How can I implement SSO Authentication with Active Directory in React App?
- Reactjs: how to put the html template in a separate file?
- How can I test styled components?
- react router page not able to refresh
- react-grid-layout example Unknown prop `_grid` on <div> tag
- How to hard code simple authentication (no backend) and redirect to home page - React
- Calling hook in onSubmit of a form
- className of "bg-danger" is always applied to the Card even if the condition is not getting satisfied
- Yup.string.when will always give the result undefined. How can i pass a string value into the .when method
- Standard way of reconnecting to webSocket server in redux-Saga?
- How to insert a hubspot form in a react js app?
- Composing material table from custom rows
- Failed proptype classes material-ui
- change width of NeWindow using react-new-window react
- Can I increase the margin-top in css based on how small I make my window?
- Active dots class on Slick Slider with ReactJS
- How to move a React component using CSS ? No functions or classes are working
- React Redux table update row
- Argument of type 'typeof test' is not assignable to parameter of type 'Component<{ children?: ReactNode; } & DispatchProp<any>>'
- React Conditionally show image using switch statement not working
- What's wrong with passing a react functional component to .map()?
- Disable auto {} insertion for React props in PyCharm
- React: Read Zip file using JSZip from the project directory
- Get MUI Slider value in onDragStop event
- Typescript - Omit props types of HoC
- Why are my GlobalStyles not working after deploying with styled components?
- What is the best way to understand that all redux-forms have been successfully submitted?