heya, I’ve been away from react for a couple years
Hooks had just come out and no-one really knew how to do a global state well especially in a way that would work with concurrent mode
I was wondering if anyone knew what best practice was these days
I love the re-frame kind of approach, but prefer to use a hooks-based / helix system.
it's still a bit of a challenge
and also not really something that has been an issue yet because concurrent mode hasn't landed
the next major version, React 18, does have opt-in concurrent features and there are some changes that global state management libraries will need to make
I've been posting about it here: https://clojurians.slack.com/archives/C012GLC2SAZ/p1630159314003500
ah interesting
I’d be interested to hear what you’d recommend for a new project starting now
use local state if you can help it 😉
for things that require global state like i.e. navigation, data fetching, use a library
e.g. react-router, react-query
my hopes and dreams are to create a CLJS lib for data fetching soon but just depends on when I have the hours in the day. hoping to get my company to pay me to do it
but I wouldn't wait for me 🙂