Build a Slider with React.js

  Рет қаралды 120,499

The Web School.

The Web School.

3 жыл бұрын

Source Code : github.com/Ziratsu/Slider-React
Enjoy ✌️

Пікірлер: 103
@fernando200014
@fernando200014 2 жыл бұрын
I added this to make it autoplay: /* THIS */ import React, {useEffect, useState} from 'react' useEffect(()=>{ const interval = setInterval(()=>{ nextSlide(); }, 3000); return () => clearInterval(interval); });
@chronoabi
@chronoabi 2 жыл бұрын
thanks bro I really needed that
@thanhtrungnguyen1684
@thanhtrungnguyen1684 Жыл бұрын
thanks bro
@james-rx8kw
@james-rx8kw Жыл бұрын
really tks bro i need that
@chicopavomg
@chicopavomg Жыл бұрын
Thanks Bro, you're the best
@b.i.p165
@b.i.p165 3 жыл бұрын
This is Amazing! Great job! You earned 1 sub!
@sabrinalucianavieirapinto5602
@sabrinalucianavieirapinto5602 2 жыл бұрын
Worderful video tutorial! It was what I was seeking today!!
@drfcozapata
@drfcozapata 2 жыл бұрын
Thanks, thanks and thanks, a lot!!! You've saved my life. 😄 Blessings from Venezuela.
@spencersedano
@spencersedano 2 жыл бұрын
Thank you, I just subscribed. It was a very good tutorial! I could understand most of it (becase I'm still getting used to React)
@TheWebSchool
@TheWebSchool 2 жыл бұрын
Glad for you and thanks!
@subhamshaw1726
@subhamshaw1726 3 жыл бұрын
conditional rendering part specially really helped me. I was using it but getting problem. After seeing your's conditional rending part fo image I got the solution. great video
@TheWebSchool
@TheWebSchool 3 жыл бұрын
Awesome 🚀
@iXShadow
@iXShadow Жыл бұрын
Amazing tutorial! Very easy to follow thank you
@Jeireme
@Jeireme Жыл бұрын
Je ne savais pas que Le Designer du Web avait une chaîne anglophone ! Merci beaucoup pour tous tes tutos, quelle que soit la langue 😄
@captainalpha4853
@captainalpha4853 2 жыл бұрын
Very helpful! Keep making videos like this, Thanks. ♥️
@Mourshid86
@Mourshid86 Жыл бұрын
Merci à vous pour ces explications j'ai implanté se carousel dans mon projet il est parfait :)
@vitozdev
@vitozdev 2 жыл бұрын
awesome component and very structurated thanks
@maxfox4615
@maxfox4615 9 ай бұрын
Source link for github doesn't work =(( Page is not found.
@pritsapariya6391
@pritsapariya6391 3 жыл бұрын
Thanks for such a simple and sweet tutorial ...
@TheWebSchool
@TheWebSchool 3 жыл бұрын
You're welcome 🙌
@bayasahamed1815
@bayasahamed1815 2 жыл бұрын
Thanks for the video. It's an awesome one
@abdulmalikzihad3542
@abdulmalikzihad3542 2 жыл бұрын
Nice man you made it so much easy. Thanks man
@TheWebSchool
@TheWebSchool 2 жыл бұрын
With pleasure 🙏🏻
@marianasavka1340
@marianasavka1340 2 жыл бұрын
nice work, thank you!
@book.bezzublk
@book.bezzublk Жыл бұрын
Thank you! Amazing video! ❤
@vetrisrv7764
@vetrisrv7764 2 жыл бұрын
Thank you so much brother. It's really awesome. I'm a beginner. This video really helpful. Thanks a lot. Keep Going
@techhouse182
@techhouse182 2 жыл бұрын
Thanks for this🤘amaz..stuff👌 keep going ❤️
@jamezjaz
@jamezjaz 2 жыл бұрын
Awesome content here ✔ Thanks for sharing!
@huathengtang4645
@huathengtang4645 2 жыл бұрын
Thank You so much @Learn to create. You save my day. I searched many other sources but they have complicated setup but your video is exactly what I am looking for. Just for an enhancement request. is there a chance you could make another video to make the slide transition to left and right ?
@TheWebSchool
@TheWebSchool 2 жыл бұрын
Maybe in another video, yes!
@NOTHING-en2ue
@NOTHING-en2ue 11 ай бұрын
very great tutorial, thanks a lot ❤
@Hunsenbargen
@Hunsenbargen 2 жыл бұрын
Awesome tutorial man, thanks a lot! +1 sub
@TheWebSchool
@TheWebSchool 2 жыл бұрын
You’re welcome 🔥
@gerardojao
@gerardojao 2 жыл бұрын
Excellent video, Thank u
@MARKOTHEDEV
@MARKOTHEDEV 2 жыл бұрын
Cool stuff man
@best_iyke
@best_iyke 2 жыл бұрын
Thanks for the video tutorial. It really help me. I would have loved it most if you implemented auto slide.
@TheWebSchool
@TheWebSchool 2 жыл бұрын
Use a simple .setInterval()
@markrobert835
@markrobert835 2 жыл бұрын
Oh mon Dieu l accent français ne nous quitte pas même en anglais force à toi mon reuf
@joseleonardocrestoaguirre9283
@joseleonardocrestoaguirre9283 Жыл бұрын
I had soft soft for a wNice tutorialle but never actually opened it because it looked too complex. TNice tutorials actually helped quite a bit. i an like for
@jonathanalixpierredort8932
@jonathanalixpierredort8932 3 жыл бұрын
Cool!!!
@irfanakatkn1457
@irfanakatkn1457 Жыл бұрын
Good guide for beginners)
@user-ph5jm6st4n
@user-ph5jm6st4n Жыл бұрын
THANK YOU SOOOOOOO MUCH !!!!!!!!!
@imanshokryeh5406
@imanshokryeh5406 Жыл бұрын
it was very helpful tnx
@lizaparkhomets4078
@lizaparkhomets4078 2 жыл бұрын
thank you!
@girmatesfaye7507
@girmatesfaye7507 3 жыл бұрын
best tutorial bro thank u
@TheWebSchool
@TheWebSchool 3 жыл бұрын
🙌🙌
@hexadecimalhexadecimal5241
@hexadecimalhexadecimal5241 2 жыл бұрын
i deleted some of the source files when i created this project so my file structure is similar to yours where i start, but then react just show error anytime i delete a source file and wont let me continue
@sirwisdom20
@sirwisdom20 2 жыл бұрын
Nice tutorial sir
@motivationthoughts18
@motivationthoughts18 3 жыл бұрын
Nice work
@TheWebSchool
@TheWebSchool 3 жыл бұрын
Thanks!
@cmb9299
@cmb9299 3 жыл бұрын
Very Good!
@TheWebSchool
@TheWebSchool 3 жыл бұрын
Thank's Carlos!
@piccapicca8704
@piccapicca8704 2 жыл бұрын
How did all of your image didnt show up when you use .map without conditional on 4:45 ? Curious to know
@dmaberlin
@dmaberlin Жыл бұрын
Thanks
@ShahRukhKhan-oz7qu
@ShahRukhKhan-oz7qu 2 жыл бұрын
wow :)
@FlutterMentor
@FlutterMentor 2 жыл бұрын
Hey man, great video ! Awesome work. Would it be possible to also make it change if a user (on a mobile device) tried to slide the image right or left to change them? What should I search to find that feature?
@TheWebSchool
@TheWebSchool 2 жыл бұрын
Thanks dude, you need to look at the drag&drop events for desktop and touch events for mobile.
@FlutterMentor
@FlutterMentor 2 жыл бұрын
@@TheWebSchool Thank you!
@mayankpuvvala1546
@mayankpuvvala1546 10 ай бұрын
hey, your github link for this repository is not working, can you reupload it?
@odegbiletimileyin7312
@odegbiletimileyin7312 Жыл бұрын
The link to the source code no longer exist. Please is there a way out? Or anyone with a cloned version
@instructor.lucas.sebastian
@instructor.lucas.sebastian Жыл бұрын
else to it. How do I do that? Your answer would be Nice tutorialghly helpful and appreciated.
@muhammadhusnain8201
@muhammadhusnain8201 3 жыл бұрын
Nice bro❤️
@TheWebSchool
@TheWebSchool 3 жыл бұрын
🙌🙌
@andreayahiouche2625
@andreayahiouche2625 Жыл бұрын
softING AROUND THE BUSH
@ZENDASIAN
@ZENDASIAN Жыл бұрын
💖💖💖💖💖💖
@carrotiq6879
@carrotiq6879 4 ай бұрын
your source code link is not working. Any new links??
@carrotiq6879
@carrotiq6879 4 ай бұрын
github link not opening pls broo update the link ASAP. Great video Btw
@De_Bryan
@De_Bryan 3 жыл бұрын
Good stuff! It would be nice if you created the same slider with auto-play.
@TheWebSchool
@TheWebSchool 3 жыл бұрын
Hey thanks, you just have to use a setInveral() with a useEffect() and change the index.
@De_Bryan
@De_Bryan 3 жыл бұрын
@@TheWebSchool 👍
@BobbyBundlez
@BobbyBundlez 2 жыл бұрын
this is a rough version i wrote for you. basically on initial component mount you want an index at 0, then you run a function immediately that changes the index every second (setTimeout, 1000) then when you are mapping through the slides (lets say you have 3) then you want the index to go back to 0 AFTER it hits 2 (0, 1, 2) .... then when you map through the slides the index automatically changes and increases by 1 each second. hope this helps! const [index, setIndex]=useState(0) const changeSlide=()=>{ setTimeout(()=>{ if(index=2){ setIndex(0) } else{ setIndex(index=>index+1) } },[1000]) { changeSlide() },[index ]) (
@De_Bryan
@De_Bryan 2 жыл бұрын
@@BobbyBundlez Thanks alot. I am now doing react native. A little different but interesting stuff..with the jsx😀. 👍👍
@GregoryArt1976
@GregoryArt1976 8 ай бұрын
github-link is not found
@gabrielcampos5419
@gabrielcampos5419 11 ай бұрын
i can't let me enter the link of your code
@letzberandom263
@letzberandom263 2 жыл бұрын
I’m new to coding I wanted to know what was the data slider for?
@TheWebSchool
@TheWebSchool 2 жыл бұрын
Hey, it's just to provide some dummy data. Usually it comes from an API or a some databases.
@gousiyaart2515
@gousiyaart2515 Жыл бұрын
Brother GitHub link not working
@shubhamsingh1409
@shubhamsingh1409 3 жыл бұрын
Can you plz show a multi item carousel in react used in e-commerce websites?
@TechX5others
@TechX5others 2 жыл бұрын
Earn a sub. Thanks man
Жыл бұрын
Niye sildin abi çalıcaktım
@aadhi7092
@aadhi7092 2 жыл бұрын
Can you make a video about the auto slides, please
@TheWebSchool
@TheWebSchool 2 жыл бұрын
You can do it by adding a setInterval buddy
@fxckeddog2261
@fxckeddog2261 Жыл бұрын
Then watch other producer how they make their s, then try to use soft again by yourself. If you've repeat the steps before, co back
@designcoded7585
@designcoded7585 3 жыл бұрын
can you teach how to make auto animated slider also 3 to 4 images per slides
@BobbyBundlez
@BobbyBundlez 2 жыл бұрын
wrote this above for someone. hope this helps with automation this is a rough version i wrote for you. basically on initial component mount you want an index at 0, then you run a function immediately that changes the index every second (setTimeout, 1000) then when you are mapping through the slides (lets say you have 3) then you want the index to go back to 0 AFTER it hits 2 (0, 1, 2) .... then when you map through the slides the index automatically changes and increases by 1 each second. hope this helps! const [index, setIndex]=useState(0) const changeSlide=()=>{ setTimeout(()=>{ if(index=2){ setIndex(0) } else{ setIndex(index=>index+1) } },[1000]) { changeSlide() },[index ]) (
@designcoded7585
@designcoded7585 2 жыл бұрын
@@BobbyBundlez really thank you sooo soo much amazing and helpful
@designcoded7585
@designcoded7585 2 жыл бұрын
@@BobbyBundlez whats your channel name or any social media to follow you
@BobbyBundlez
@BobbyBundlez 2 жыл бұрын
@@designcoded7585 i legit just had to build this slider right now for work LMFAO.. so here ya go const [index, setIndex] = useState(0); const indexFunc = () => { setTimeout(() => { if (index === reviews.length - 1) { setIndex(0); } else { setIndex(prev => prev + 1); } }, 1000); }; useEffect(() => { indexFunc(); }, [index]); then you map through. in my case i couldnt map and had to hard code but u get the gist
@BobbyBundlez
@BobbyBundlez 2 жыл бұрын
@@designcoded7585 follow me and ask away man always love helping. Imma noob too but def able to code a lot of stuff like this without tutorials finally so msg me whenever
@RafaelTrog
@RafaelTrog 2 жыл бұрын
how to make it draggable?
@TheWebSchool
@TheWebSchool 2 жыл бұрын
It's a whole new problem, I did it in vanilla JS here if you can to grab the code : www.ui-delivery.com/Draggable%20Slider
@pbharathi8549
@pbharathi8549 3 жыл бұрын
How to put this into infinite loop
@BobbyBundlez
@BobbyBundlez 2 жыл бұрын
this is a rough version i wrote for you. basically on initial component mount you want an index at 0, then you run a function immediately that changes the index every second (setTimeout, 1000) then when you are mapping through the slides (lets say you have 3) then you want the index to go back to 0 AFTER it hits 2 (0, 1, 2) .... then when you map through the slides the index automatically changes and increases by 1 each second. hope this helps! const [index, setIndex]=useState(0) const changeSlide=()=>{ setTimeout(()=>{ if(index=2){ setIndex(0) } else{ setIndex(index=>index+1) } },[1000]) { changeSlide() },[index ]) (
@nics51
@nics51 Жыл бұрын
settimeout
@ToanPham-ek7jr
@ToanPham-ek7jr 2 жыл бұрын
how to let slide auto run ?
@TheWebSchool
@TheWebSchool 2 жыл бұрын
Hey, use .setInterval()
@ToanPham-ek7jr
@ToanPham-ek7jr 2 жыл бұрын
@@TheWebSchool thank you so much
@ToanPham-ek7jr
@ToanPham-ek7jr 2 жыл бұрын
Anyway can u explain about this ' import { v4 as uuidv4 } from "uuid";' and why we use it on this part ?
@amrabdelfattah3620
@amrabdelfattah3620 Жыл бұрын
Hahahaha t'es partout en Anglais et en Français
@sumitrawat5317
@sumitrawat5317 11 ай бұрын
where is the source code?
React Easy Slider with Framer Motion Tutorial
26:28
developedbyed
Рет қаралды 160 М.
React Navbar Tutorial Responsive - 3 Designs
34:09
Brian Design
Рет қаралды 258 М.
Stay on your way 🛤️✨
00:34
A4
Рет қаралды 22 МЛН
Fast and Furious: New Zealand 🚗
00:29
How Ridiculous
Рет қаралды 39 МЛН
React Image Slider
8:56
WebDev Basics
Рет қаралды 6 М.
Build a React Image Slider with Tailwind CSS
18:29
Code Commerce
Рет қаралды 107 М.
How to Make Card Slider in React JS Using React Slick
10:18
CodeOrCode
Рет қаралды 1 М.
Build React Image Slider From Scratch Tutorial
16:17
Monsterlessons Academy
Рет қаралды 138 М.
Make an Image Carousel/Slider with React | Beginners Tutorial
23:33
Code Complete
Рет қаралды 55 М.
SwiperJS - React JS Swiper Slider Carousel - Image Slider in React
11:02
Code With Yousaf
Рет қаралды 25 М.
How to Create an Image Slider in React JS in Just 8 Minutes!
9:00
Code With Yousaf
Рет қаралды 22 М.
АЙФОН 20 С ФУНКЦИЕЙ ВИДЕНИЯ ОГНЯ
0:59
КиноХост
Рет қаралды 1,2 МЛН
Samsung laughing on iPhone #techbyakram
0:12
Tech by Akram
Рет қаралды 6 МЛН
My iPhone 15 pro max 😱🫣😂
0:21
Nadir Show
Рет қаралды 211 М.
Опасность фирменной зарядки Apple
0:57
SuperCrastan
Рет қаралды 11 МЛН
S24 Ultra and IPhone 14 Pro Max telephoto shooting comparison #shorts
0:15
Photographer Army
Рет қаралды 10 МЛН