You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
The text was updated successfully, but these errors were encountered:
Thanks for opening. I'm definitely open to this, would like it to support Immutable.js. I think the proposal sounds good but its a tad tricky to implement. Would either need to replace the following call, maybe others or integrate it into the redux-mux helper:
I published redux-mux so happy with either path, just not implementing this at its level would require more changes in this library. Feel free to post a PR, otherwise I will take a look at this the next time I get a chance to work on the project.
I am using the lib wit redux-immutable store. My state is
Immutable.Map()
. That causes problem with action.jsselectIdleState()
function, since the lib is retrieving idle state withstate.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?
The text was updated successfully, but these errors were encountered: