-
Notifications
You must be signed in to change notification settings - Fork 9
Description
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?