From Context API to RecoilJS
summary
Migrates an app from Context API to RecoilJS and shows concrete code changes: swapping Provider for RecoilRoot, replacing useState/useContext with useRecoilState and useRecoilValue, adding atoms and a selector to sync theme to localStorage, and using atom family plus useRecoilCallback to create per‑hotel atoms on the fly for ~10 Malibu hotels served by a GraphQL API (Apollo + Couchbase). Demo proves per‑item updates re‑render only that item and the examples run.
AI-written summary · about
chapters (7)
- 0:00Start
- 0:26Resources
- 1:53Context Api Component
- 10:31Selector
- 15:45Graphql Api
- 19:44Favorite List
- 20:52Creating an Atom Family
related talks
34mRecoil: State Management for Today's React
46mReact in All Its States
18mDestructuring state management (in React)
35mHandling Large-Scale State Management with Context and Hooks
15mStop using Redux
55mThe State of React’s State in 2019
28mReact Context - Lessons Learned
05mRedux dhe velgat për pasimin e të dhënave në komponente të React
