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

computed properties ought not be persisted #539

Closed
mighdoll opened this issue Aug 22, 2020 · 3 comments
Closed

computed properties ought not be persisted #539

mighdoll opened this issue Aug 22, 2020 · 3 comments
Labels
bug Something isn't working

Comments

@mighdoll
Copy link
Contributor

When using persist() I'd expect computed properties not to be stored.

Root level computed properties are not persisted. But computed properties nested in the model are persisted as static values. I'd think computed values should never be persisted.

In practice, the static property is overwritten with a computed getter in the rootReducer. So the statically stored value mostly just wastes space (and maybe causes a bit of confusion when debugging).

@ctrlplusb
Copy link
Owner

Hi @mighdoll

I agree. Will mark this as a bug.

@ctrlplusb ctrlplusb added the bug Something isn't working label Sep 4, 2020
@ctrlplusb
Copy link
Owner

This is resolved in upcoming v4 release.

@johtso
Copy link

johtso commented Jul 1, 2021

I wonder if this should also apply to what is displayed in redux dev tools? It can be quite messy if you have lots of computed properties and they are displayed with all your state diffs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants