Recoil offers several hooks to use for consuming state in React, and this lesson looks at how to choose which hook to use, and what happens when you don't use the right hook (hint: extra renders).
The three basic RecoilJS hooks are:
useRecoilState
, which is great for reading and writing state,useRecoilValue
, ideal for reading state, anduseSetRecoilState
, the primary candidate when you just need to write state.