rt2zz / redux-persist-transform-immutable

immutable support for redux-persist
112 stars 42 forks source link

need docs about lifecycle #11

Closed geminiyellow closed 8 years ago

geminiyellow commented 8 years ago

hi @rt2zz ,

thanks for you work. but i cannot put the redux-persist and immutable together. could you please give some example code about how to use it?

and about the workflow, i think if you can write something in docs, i will very he

In addition, about lifecycles, if you have some description on this, I think it will be very helpful for everyone.

in my case, i tried it out from (tj/frontend-boilerplate)[https://github.com/tj/frontend-boilerplate] , add immutable.js, create the initialState from fromJS(initialState), if no use redux-persist, it work well, but when i add this libs,

image

could you tell me, why do store being converted to object? the "persist/REHYDRATE" will cause twice re-render ?

rt2zz commented 8 years ago

redux-persist-transform-immutable will only work to transform individual reducers to be immutable, not the entire redux state. My recommendation for now would be to either not use immutablejs for your entire state, or to write custom persist logic.

geminiyellow commented 8 years ago

@rt2zz ok, i think it was my mistake.