For top down state, the context api should be performant enough because the compiler will optimize re-renders. Jotai is a great library with a growing eco-system for other use-cases.
Jōtai (Japanese for 'state') is pronounced with a j sound. Hōtai, on the other hand, means 'bandage' in Japanese - something you might need after this linguistic burn.
It does make it hard to differentiate between it and the general concept of state when speaking Japanese tho. I've heard people pronounce the library Jotai with a short o instead of ō to make the distinction a bit clearer
Now I’m curious! My time in Japan slightly predates Jōtai, so I missed out on how people adapted its name. I did find https://jotaifriends.dev/, and they seem to use both but prefer the short 'o,' as you mentioned.
never thought i’d see the day where both sides of my personality (react state management, channel tres) would be featured together in a ben holmes whiteboarding video
Great video, I love the format and I’d love to see such breakdowns for other concepts!
I’d only add, since you mentioned that Jotai is best if “get and set is all you need”: That is true, yet you can achieve way more than that with Jotai and easily rely on it! Composing atoms gives so many options!
Had a change of heart! I’m happier with jotai for what I’m building. Still, I’d probably take xstate store over Zustand if I took a top down approach to state again https://bsky.app/profile/bholmes.dev/post/3lfiqqrmhkk2s
Comments
Dig this <60s explainer format!
Being newer to the React world, I find library analysis paralysis is very real. This style content is perfect for breaking that cycle.
I’m just trying to understand, sustains is a very small dependency
All my other app state is async/remote and managed via React Query.
Also "bottom-up" atomic state seems to fit my brain a bit better.
It just seems like Jotai is a 10/10 fit for my use-case whereas Zustand was an 8/10.
@daishikato.com
I’d only add, since you mentioned that Jotai is best if “get and set is all you need”: That is true, yet you can achieve way more than that with Jotai and easily rely on it! Composing atoms gives so many options!