Skip to content
This repository has been archived by the owner on Jul 10, 2019. It is now read-only.

Is it possible to have computed / derived state? #348

Open
gregkerzhner opened this issue Apr 17, 2019 · 0 comments
Open

Is it possible to have computed / derived state? #348

gregkerzhner opened this issue Apr 17, 2019 · 0 comments

Comments

@gregkerzhner
Copy link

gregkerzhner commented Apr 17, 2019

Is it possible to have calculated or derived data from inside the cache? Something similar to https://github.com/reduxjs/reselect?

Lets say I have a list of todos inside my cache, and I want to keep track of a field thats numberOfTodos. Can I set something up where numberOfTodos is calculated automatically based on todos.length? The only way I see to do this currently is to store numberOfTodos as an additional field in the cache which is not ideal because the goal of any state management system should be to store the least amount of data possible and have the rest be derived.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant