Replies: 2 comments 2 replies
-
Actually to follow up on my own question, I really should be thinking about Features not States. Features are being initialized immediately is more what I'm concerned about, not the States. The States are a side effect of the Features. |
Beta Was this translation helpful? Give feedback.
0 replies
-
When you agent in the X feature of your app, set its state to null (or some kind of empty state). |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I have been investigating using Fluxor for a fairly large application and I have been struggling to understand states and how they are persisted in memory. From what I have seen, all states are initialized as soon as the application is launched and are persisted through its lifetime. Would this not be a poor use of memory in a larger application? What if there were thousands or tens of thousands of states? In my case this is possible and it feels like it would be more efficient to have states scoped to the area they are relevant to, rather than all of them being global.
In looking for clearer understanding of this issue, I stumbled across this post from last year: #215
I don't quite follow the answer though, particularly this:
What is meant by "each feature can be cleared down"? Is there a way to clear a feature and its state from memory? Or am I overreacting to this and having thousands of states in memory isn't actually a big deal?
Or, would IStateSelection with an immutable dictionary of states achieve what I'm looking for? Per this question: #359
I could have a global state with an immutable Dictionary of sub-states that I can clear out of memory with effects, if that makes sense.
Thanks! Just looking for some clarification.
Beta Was this translation helpful? Give feedback.
All reactions