helix

danielneal 2021-08-30T15:49:17.021800Z

heya, I’ve been away from react for a couple years

danielneal 2021-08-30T15:49:54.022500Z

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

danielneal 2021-08-30T15:50:06.022800Z

I was wondering if anyone knew what best practice was these days

danielneal 2021-08-30T15:50:20.023200Z

I love the re-frame kind of approach, but prefer to use a hooks-based / helix system.

lilactown 2021-08-30T17:08:35.024200Z

it's still a bit of a challenge

lilactown 2021-08-30T17:14:21.025Z

and also not really something that has been an issue yet because concurrent mode hasn't landed

lilactown 2021-08-30T17:14:54.025700Z

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

lilactown 2021-08-30T17:15:16.026Z

I've been posting about it here: https://clojurians.slack.com/archives/C012GLC2SAZ/p1630159314003500

danielneal 2021-08-30T21:14:18.026300Z

ah interesting

danielneal 2021-08-30T21:14:29.026600Z

I’d be interested to hear what you’d recommend for a new project starting now

lilactown 2021-08-30T22:14:22.026900Z

use local state if you can help it 😉

lilactown 2021-08-30T22:14:37.027300Z

for things that require global state like i.e. navigation, data fetching, use a library

lilactown 2021-08-30T22:15:16.027600Z

e.g. react-router, react-query

lilactown 2021-08-30T22:15:46.028300Z

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

1
lilactown 2021-08-30T22:16:01.028500Z

but I wouldn't wait for me 🙂