Skip to content

Support Immutable.js #27

@xnyl

Description

@xnyl

I am using the lib wit redux-immutable store. My state is Immutable.Map(). That causes problem with action.js selectIdleState() function, since the lib is retrieving idle state with state.idle instead of state.get('idle'). That causes error in the console like 'Uncaught Error: idle monitor state should have idle value'. Basides above, the lib works great, I really appreciate your work.

My proposition is to add something like stateTransformer function, configurable with opts. If present, the user will have an option to define how his state is going to be transformed into expected pure JS Object. Like this:
const opts = { ... idleStatusAction, activeEvents, stateTransformer: state => state.toJS() // assuming its Immutable.js }

What do you think? Maybe there is an other way to achieve this?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions