A React Hooks rebuild of the previous slider, which utilized class based components & redux. No matter how many slides are put into the slider as props, we only render three slides at a time, which dramatically reduces the amount of logic/math that we need to do.
Simple.
git clone https://github.com/DZuz14/react-hooks-image-slider.git
cd react-hooks-image-slider
npm i
npm start
If you are here from Medium or YouTube, I've separated each part into different branches, so you can view/run the code from that point in time. Below you can find links to all of the articles and videos as well.
- React Slider Part 1
- React Slider Part 2: Autoplay
- React Slider Part 3: Smooth Transitions & Browser Resizing
- React Slider Part 1
- React Slider Part 2: Autoplay
- React Slider Part 3: Smooth Transitions & Browser Resizing
There is no part 3 branch, the master branch is what we end up with at the end of the series.