Back to projects

React Hooks

Image Slider React UseEffect

A small React project that displays an automatic image slider. The slider moves to the next image every 2 seconds and can be shown or hidden with a button. The project was built to practice useState, useEffect, conditional rendering, component structure, interval logic with setInterval, and cleanup with clearInterval.

ReactViteJavaScriptuseStateuseEffectsetIntervalclearIntervalConditional Rendering
React Image Slider demo