Hands-on practice for this lecture. Write the code, see it run, understand the pattern.
Exercise 1 of 1
Provider is wired. Replace the hardcoded empty array with useSelector — and watch deletions automatically re-render the list.
Task
Provider is in place. Open Tasks.js and replace the hardcoded [] with a useSelector call.
The store state in this app is the task array itself (not nested). Your selector: (state) => state. Once correct, the three initial tasks appear. Delete one — useSelector triggers a re-render automatically.