Course lesson
Use useRecoilValue Hook to Read a Value From a Recoil Atom
Not every component is going to modify a 'global' state stored in a Recoil atom - in some cases a component just needs to be able to read the value.
- Duration
- 1 min
- Access
- Pro
- Transcript
- Available
Not every component is going to modify a 'global' state stored in a Recoil atom - in some cases a component just needs to be able to read the value.
In this quick lesson we're going to learn how to use a useRecoilValue hook to ensure that a component will be able to read a number stored in a Recoil atom in a read-only fashion.