Coding task · JavaScript and React course · Module 5: useEffect and Custom Hooks

Practice: Ship Dashboard

Build a ShipDashboard component combining useState, useEffect, and event handling. The dashboard should display fuel level, temperature, and engine status with automatic updates every 2 seconds.

Task

Create ShipDashboard with useState for fuel/temperature/engine, useEffect with a 2s interval, and buttons to control the systems