Coding task · Next.js course · Module 1: Next.js Configuration

Practice: Client Component

'use client' at the top of the file = Client Component. You can use useState, useEffect, onClick, and other hooks. It renders in the browser. Use it only when you need interactivity!

Task

Create a Client Component NeuralVisualizer (export default): add 'use client' at the top of the file, keep the activity in useState (a boolean, false at first), add an "Activate Neural Link" button that changes the state, and display "Status: ACTIVE" or "Status: INACTIVE".