Build an Image Slider in React JS with useState hook
No need to install a library for this π
But who would want to build an image slider from scratch? Who has the time and patience for such a thing? Believe me sometimes you do not want a library, there can be disadvantages of installing a library. Have you considered how large a library is, for example bootstrap can be 187 KB when installed and even the compressed CDN version is 20KB. And there are restrictions that come with the libraries that can really mess up your own designs. For example, one time when I installed tailwindcss it messed up the entire page of my almost complete website. So I had to uninstall it. By all means install libraries and frameworks to make your life easier. But there will come circumstances and situations when it will be absolutely redundant to do so. There will be situations when installing a css library would already mess up your almost perfect designs. Sometimes you can make things from scratch such as an image slider and it is extremely simple and easy π€ to do such a thing.
At first create a react app by
npx create-react-app