Closed mwalsher closed 8 years ago
see ensureState
in the readme. I do something similar in my meatier repo that you can check out.
As a side note, I suggest you keep your 3rd party reducers as pure JS objects. While it's ugly to have a mutable inside an immutable, most developers don't officially support both so you'll eventually end up with at least one that has to be a mutable. Also, all performance gain is lost when you have to convert to an immutable & back to a JS object.
Ah yes, of course – thanks!
Hey Matt,
Nice work on this package. I'm having some trouble getting it working with react-router-redux however... specifically the
listenForReplays
part (see below). Basically the linelet routerState = state.getIn(['router', 'location'])
evaluates toundefined
. Without theoptimistic
wrapper aroundrootReducer
, everything works fine however. I suspect it has something to do with initialization, but am not sure if it's something I'm doing wrong or if there is an incompatibility somewhere.Let me know if you need any further information about the configuration.
Cheers