Amir Movahedi
Amir Movahedi

Reputation: 1792

redux-form fire action change value but not change input value

I'm using simple form by redux-form. I can see the log which fire action which change the field however it the change is not displayed in input field itself. Seems redux-form is not able to change input value. I'm using React version 16.3.

[Update]

I'm using exact sample redux-form document.

Upvotes: 2

Views: 298

Answers (1)

Michal Cholewiński
Michal Cholewiński

Reputation: 464

I suscpect that You didn't connect redux-form with store. I had one same issue. This code is important.

import { createStore, combineReducers } from 'redux'
import { reducer as formReducer } from 'redux-form'

const rootReducer = combineReducers({
  // ...your other reducers here
  // you have to pass formReducer under 'form' key,
  // for custom keys look up the docs for 'getFormState'
  form: formReducer
})

const store = createStore(rootReducer)

Upvotes: 2

Related Questions