Fork me on GitHub
#helix
<
2021-08-30
>
danielneal15:08:17

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

danielneal15:08:54

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

danielneal15:08:06

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

danielneal15:08:20

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

lilactown17:08:35

it's still a bit of a challenge

lilactown17:08:21

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

lilactown17:08:54

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

danielneal21:08:18

ah interesting

danielneal21:08:29

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

lilactown22:08:22

use local state if you can help it 😉

lilactown22:08:37

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

lilactown22:08:16

e.g. react-router, react-query

lilactown22:08:46

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

simple_smile 2
lilactown22:08:01

but I wouldn't wait for me 🙂