Skip to content

Does TCA really meant to be a single state/store per application? #1123

Answered by mbrandonw
shahzadmajeed asked this question in Q&A
Discussion options

You must be logged in to vote

Your app may have 50 features, but are all 50 features active at once? If they are, then you are going to have memory problems regardless if you have 1 store with 50 features or 50 stores with 1 feature.

In practice, an app with 50 features does not have all 50 active at once. Say you have a tab bar application with 4 tabs, and each tab is a feature. That means when the application first starts you have 4 active features.

Then say the first tab has a drill down to another feature. That feature is not active until you actually drill down. You can model that with optional state so that it is nil until activated and its view is not shown until it is activated.

Then say that drill down screen…

Replies: 2 comments 6 replies

Comment options

You must be logged in to vote
1 reply
@shahzadmajeed
Comment options

Comment options

You must be logged in to vote
5 replies
@shahzadmajeed
Comment options

@mbrandonw
Comment options

@shahzadmajeed
Comment options

@mbrandonw
Comment options

@shahzadmajeed
Comment options

Answer selected by shahzadmajeed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants