These slides have been presented in a webinar about Recoil at the Codete Tech Talks with Cloudinary on January 14th 2021.
Author: Mateusz Bryła (https://www.linkedin.com/in/mateusz-bryła-78aa1572/)
Dreamer, programmer, consultant, trainer. Founder at Lingmates, Team Lead at Codete for Cloudinary.
3. Agenda (~40 min)
● Meet the audience ;)
● Where we are with state management?
● Let’s listen to the story of ........................ - the Project Owner
● Recoil basics
● Live demo ;)
● Summary
● Further reading
● Q&A
4. State of the art of the management of the state
Flexibility,
Possibilities
Effort,
Overhead,
Learning curve
●
Redux
●
useState + props
●
React Context
●
Redux + Redux Toolkit
●
MobX
5. State of the art of the management of the state
Flexibility,
Possibilities
Effort,
Overhead,
Learning curve
●
Redux
●
useState + props
●
React Context
●
Redux + Redux Toolkit
●
MobX
●
Recoil
29. Recoil core concepts - summary
● Flexible shared state
● Derived data and queries
● App-wide state observation
● (built in asynchronous data handling)
● (built in React concurrent ready)
31. Should I bother?
● Need more than a simple Context can handle
● Don’t like to introduce too much overhead
● Are not scared by the “experimental” keyword…
● … but want to be ready for React Concurrent Mode
32. For under-the-hood addicts
● Works similar to react-redux
○ exposes Redux internal tree structure, wraps with HOC
and allows data read (only when necessary) and manipulation
○ exposes Recoil internal Atoms tree structure, hooks allow data
read (only when necessary) and manipulation
● There is more, check it out yourself ;)
33. For bettime readers
● Introduction to Recoil by its creator - Dave McCabe (@mcc_abe)
https://www.youtube.com/watch?v=_ISAA_Jt9kI
● Official Recoil docs (be aware of “This API is currently under development and will change”)
https://recoiljs.org/docs/introduction/core-concepts
● Recoil source
https://github.com/facebookexperimental/Recoil
● React concurrent mode
https://pl.reactjs.org/docs/concurrent-mode-intro.html
● This presentation