Skip to content
This repository was archived by the owner on Apr 1, 2019. It is now read-only.
This repository was archived by the owner on Apr 1, 2019. It is now read-only.

Error when middleware included with redux-immutable-state-invariant #29

@nkdevirl

Description

@nkdevirl

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)

Is this something I can ignore? the error disappears when I change applyMiddleware to

applyMiddleware(thunk)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions