Why would I need Recoil if I have already React Query or Redux?

Christine Mathews

Christine Mathews / November 24, 2022

1 min read

You can move client state with it in a very easy way. Think you have a state in one of the component but you need that state in a sibilin component somwhere. Recoil helps you move that state easy from one component to another. Meanwhile React Query manages the state coming from whatever async requestes (from the server). Redux can do both but it is much more complex to use. I hope this helps you understand.

PS: Just to say: you can use Recoil for async state too but it is better not. Use it only for client state and use RQ for server state. Recoil was in kind of beta since forever for fetching data. But it works perfect for client state.