tasit-apps icon indicating copy to clipboard operation
tasit-apps copied to clipboard

What is the best way to store loading states / React Suspense discussion

Open marcelomorgado opened this issue 5 years ago • 2 comments

We are encapsulating both account and assetsList loading states inside of their objects (on redux reducers). Should we keep that way or keep them on the same higher level? This question was originated from this thread: https://github.com/tasitlabs/tasit/pull/194#discussion_r269168560

marcelomorgado avatar Mar 26 '19 18:03 marcelomorgado

I've made a quick read about React Suspense and seems with that manage loading flags won't be necessary.

Refs: https://blog.logrocket.com/async-rendering-in-react-with-suspense-5d0eaac886c8 https://hackernoon.com/magic-of-react-suspense-with-concurrent-react-and-react-lazy-api-e32dc5f30ed1

marcelomorgado avatar Mar 27 '19 12:03 marcelomorgado

Thanks for looking into this. I'll take a look sometime soon!

pcowgill avatar Mar 27 '19 14:03 pcowgill