Weakness to maintain asynchronous logic #1985
-
MST is state management library, but it doesn't solve challenges caused from asynchronous requests. Therefore, I think it would be better to separate async logic with query. We can solve problems on our own, but it's verbose and could be buggy. You can read Migrating from MobX (State-Tree) to React Query and will figure out the problems related to async server requests. So, is it better approach to extract async logic into query library? I couldn't find out other way and out codebase is big enough. Thanks! 😄 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi @baeharam! I think it's hard to give a blanket answer for all use cases. Using just MST and having your asynchronous logic in |
Beta Was this translation helpful? Give feedback.
Hi @baeharam!
I think it's hard to give a blanket answer for all use cases. Using just MST and having your asynchronous logic in
flow
actions works great for a lot of apps, but just treating MST like a store and having more complex fetch logic in your React components with React Query is a nice way to go about it as well, if your particular project demands it.