1. 1
    Update Recoil State in React using useRecoilState
    4m 6s

Update Recoil State in React using useRecoilState

InstructorYoni Weisbrod

Share this video with your friends

Send Tweet

Learn how to set state in Recoil using the useRecoilState hook.

Sound familiar? It should, because it works very similarly to React's built-in useState hook (the functional component equivalent of setState).

In this lesson, we'll practice removing and adding items from an array that we keep in state using a Recoil atom. We'll create new immutable functions, and then call our setter functions in order to update the state.