DEV Community

Discussion on: Redux or Recoil?

Collapse
 
jimmymcbride profile image
Jimmy McBride • Edited

Also, going React context API is another way to go as well. Nothing wrong with that. For larger projects that use global state management, the Redux middleware logger is a beautiful thing in my opinion. If you use the Redux toolkit, it comes built-in with a logger type middleware and has some even fancier things that you can do with it. I prefer Redux over context for all the dev tools and fancy features that you can add to it. I also like the syntax of it all.

These days, I build my back ends with GraphQL and Apollo, so I let Apollo manage all of my state coming from the API. Apollo cache has some amazing features that Redux doesn't have. Like when you update a table and you can update the cache everywhere in your UI by just specifying that you want to refetch a query when the mutation is done. Lot's of great dev tools as well. Apollo does an amazing job at state management in my opinion.