The Wayback Machine - https://web.archive.org/web/20200604220600/https://github.com/rt2zz/redux-persist/issues/1151
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs Explanation of CreateTransform is Confusing #1151

Open
Dsolnik opened this issue Jan 24, 2020 · 0 comments
Open

Docs Explanation of CreateTransform is Confusing #1151

Dsolnik opened this issue Jan 24, 2020 · 0 comments

Comments

@Dsolnik
Copy link

@Dsolnik Dsolnik commented Jan 24, 2020

Hello!

I was reading through the ReadMe and it was a little unclear how it worked. I thought, at first, that the inboundState and outboundState would be the entire state (the entire redux state tree). However, after trying to debug things and finally deciding to just look at the code I realized that it actually only takes in a sub-section of the state. If I understand things correctly, it only takes the state related to the reducers specified in the whitelist property and transforms this.

Object.keys(rawState).forEach(key => {
state[key] = transforms.reduceRight((subState, transformer) => {
return transformer.out(subState, key, rawState)
}, deserialize(rawState[key]))

I found this from here.

I think it would be helpful to specify this.

@Dsolnik Dsolnik changed the title Docs Explanation of CreateTransform is very not clear Docs Explanation of CreateTransform is confusing Jan 24, 2020
@Dsolnik Dsolnik changed the title Docs Explanation of CreateTransform is confusing Docs Explanation of CreateTransform is Confusing Jan 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
1 participant
You can’t perform that action at this time.