DEV Community


Discussion on: Recoil - Ideal React State Management Library?

markerikson profile image
Mark Erikson

Hi, I'm a Redux maintainer. A few quick notes:

  • To my knowledge, Recoil is not currently Concurrent Mode compatible. David McCabe made a couple comments on Reddit about investigating options like the upcoming useMutableSource hook, but I don't have a link to that discussion atm.
  • React-Redux will also eventually be using that useMutableSource hook when it's out, likely in a React-Redux v8 release. This won't make it "fully CM compatible", but it will likely be sufficient to allow React-Redux to work in a CM-configured React app
  • The Redux code splitting recipe you pointed to basically boils down to re-generating the root reducer by calling combineReducers again, and then passing that to store.replaceReducer()
  • I'm currently working on a major set of updates to the Redux core docs, including new tutorials and reorganized content. That said, you mentioned things like "where does my business logic go?", and we specifically already answer questions like that in the Redux FAQ. The new Redux Style Guide page also gives specific guidance on recommended patterns and best practices.
  • Finally, please check out our official Redux Toolkit package, which is specifically designed to simplify most common Redux use cases.

Note that I'm not saying anything negative about Recoil here. While I haven't tried it out, it definitely looks interesting. I'm just saying that you might want to reconsider the list of negatives you listed for Redux :)

alexandrzavalii profile image
Alex Zavalii Author

Thank you Mark! I will follow your notes.