1
2
3
4
5
6
Use the "Verify Solution" button to get AI feedback on your react medium task code.
Your goal is to complete the TodoList component.This component should display a list of tasks, where each task has a text and a completed status. Requirements: 1.The component should initialize its internal state with the initialTasks prop. 2.Each task item should display its text. 3.Each task item should have a button that, when clicked, toggles the completed status of that specific task. 4.The component should re-render to reflect the updated completed status. 5.Ensure proper list rendering practices (e.g., unique key prop).