Skip to content

Why jotai? #194

Answered by samsiegart
anilhelvaci asked this question in Q&A
Discussion options

You must be logged in to vote

Ultimately it's a matter of what I was most comfortable with. To rationalize I would say...

Jotai is just a lot simpler than Autodux. While Autodux is like Redux with some magic, Jotai is basically a simplified version of Recoil. I think Redux in general is more suited for the class-based components of old, and Jotai feels more natural with function components. It's essentially a global useState hook that optimizes rendering automatically, and supports things like derived state that feel natural to use (example).

A downside of Jotai is that you cannot read or write state from outside a react component, you need to use the react hooks to access the store. This makes it inconvenient to impl…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by samsiegart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants