Launch.io – Simple, Fast, Time Traveling React State Management
1–4 of 4 posts
Re: Launch.io – Simple, Fast, Time Traveling React State Management
#2Services should be passed a provider (similar to Redux). Having state stored globally can cause many issues:
- Testing is harder, as the state can be shared
- Having sub-stores is impossible
- Having parallel stores is impossible
Re: Launch.io – Simple, Fast, Time Traveling React State Management
#3A global initializeLaunch is a deal breaker. Services should be passed a provider (similar to Redux). Having state stored globally can cause many issues: - Testing is harder, as the state can be shared - Having sub-stores is impossible - Having parallel stores is impossible
Re: Launch.io – Simple, Fast, Time Traveling React State Management
#4A global initializeLaunch is a deal breaker. Services should be passed a provider (similar to Redux). Having state stored globally can cause many issues: - Testing is harder, as the state can be shared - Having sub-stores is impossible - Having parallel stores is impossible
Thanks for the feedback! As noted in my blog post, these types of tradeoffs were consciously made to simplify other aspects React state management. If, for example, sub-stores and/or parallel stores are important, Launch.IO might not be a good choice.
const launch = initializeLaunch(/* ... */);
const App = () => {
// ...
return (
...
);
};