Course contentsShow
React
Lesson 706 of 2,39619. useRefPro lesson

Common Use Case: Storing Previous Values

Use a ref to remember the previous state or prop value by updating ref.current in useEffect after render.

This lesson is for subscribers

You've completed the free preview. Subscribe to unlock every lesson in every course.