Open nkdevirl opened 6 years ago
I'm new to front end development, so hopefully I'm not wasting anyones time with this.
When I add the following to my createStore and add middleware like below
import {createStore, applyMiddleware} from 'redux'; import rootReducer from '../reducers'; import reduxImmutableStateInvariant from 'redux-immutable-state-invariant'; import thunk from 'redux-thunk'; export default function configureStore(initialState) { return createStore( rootReducer, initialState, applyMiddleware(thunk, reduxImmutableStateInvariant()) ); }
It causes the following error
Invariant Violation: A state mutation was detected between dispatches, in the path cognito.user.pool.client.api.operations.addCustomAttributes.input.defaultValue. This may cause incorrect behavior. (http://redux.js.org/docs/Troubleshooting.html#never-mutate-reducer-arguments)
cognito.user.pool.client.api.operations.addCustomAttributes.input.defaultValue
Is this something I can ignore? the error disappears when I change applyMiddleware to
applyMiddleware(thunk)
This is a duplicate of the issue I posted: https://github.com/isotoma/react-cognito/issues/28. react-cognito definitely doesn't work when your store uses applyMiddleware.
react-cognito
applyMiddleware
I'm new to front end development, so hopefully I'm not wasting anyones time with this.
When I add the following to my createStore and add middleware like below
It causes the following error
Is this something I can ignore? the error disappears when I change applyMiddleware to
applyMiddleware(thunk)