Chrome Extension

Add redux form reducer to store

To use the redux form in your react app you need to add the reducer provided by redux-form to your store. Now the store will be able to handle the actions that are coming from form components.
import { createStore, combineReducers } from 'redux'
import { reducer as rformReducer } from 'redux-form'

const rootReducer = combineReducers({
  form: rformReducer

const store = createStore(rootReducer)
Code faster with devsheet chrome extension and increase productivity as a programmer
search code from your favorite search engine instantly.
Install Now

The key name that is used to assign the redux-form reducer should be named form.

Was this helpful?
Open Code Manager We are hiring