React JS Interview Questions ( Pagination ) - Frontend Machine Coding Interview Experience

  Рет қаралды 95,633

RoadsideCoder

RoadsideCoder

Күн бұрын

🔴 Get my Complete Frontend Interview Prep course - roadsidecoder.com/course-details
#JavascriptInterview #ReactInterview #ReactJS
React Interview Question on creating Pagination for a List of Data will be created in this video along with tips and tricks to tackle your React JS and JavaScript Questions in Frontend Machine Coding Interviews.
➡️ Book an Interview Preparation call with me -
topmate.io/roadsidecoder
🟦 Follow me on Twitter and u will clear your interview 🤓 -
/ piyush_eon
➡️ Source Code -
github.com/piyush-eon/fronten...
🔗 Frontend Machine Coding Interview Series -
• Frontend Machine Codin...
🔗 Map, filter and reduce -
• Javascript Interview Q...
🔗 Cars24 Interview Experience -
• Frontend Interview Exp...
🔗 Unacademy Interview Experience -
• Frontend Interview Exp...
🔗 Tazorpay Interview Experience -
• Frontend Interview Exp...
🔗 MERN Stack Tutorial with Redux -
• MERN Stack Project Tut...
🔗 React Beginner's Project Tutorials -
• React JS Project Tutor...
-------------------------------------------------------------------------
00:00 Intro
00:34 What is Paginaton?
01:27 Problem Statement
02:35 Fetch Products Data
05:15 Render all Products
10:37 Pagination Implementation
16:04 Page Selection Logic
17:30 Next and Previous Page Logic
20:09 Backend Driven Approach
24:18 Get Interview Preparation call with me
-------------------------------------------------------------------------
⭐ Support the channel and learn from me One on One -
/ @roadsidecoder
Special Thanks to our members -

Пікірлер: 125
@RoadsideCoder
@RoadsideCoder Жыл бұрын
🔴 Get my Complete Frontend Interview Prep course - roadsidecoder.com/course-details 🟪 Follow me on Instagram and u will clear your interview 🤓 - instagram.com/roadsidecoder/ ➡ Book an Interview Preparation call with me ( 20% OFF for limited time ) - topmate.io/roadsidecoder
@rishiraj2548
@rishiraj2548 Жыл бұрын
Request ya dhamki?
@ehsankabir5235
@ehsankabir5235 9 ай бұрын
Client side pagination is useless if you fetch all the data at once what's the point of pagination, you definitely should make a backend pagination functionality
@ninjaplavi
@ninjaplavi Жыл бұрын
Thank you, man! Always relevant content, well explained and structured.
@Sandeep-zd6dq
@Sandeep-zd6dq Жыл бұрын
Now I am addicted to your content 😂 Amazing video on Frontend drived pagination 😎🙌
@navvneat
@navvneat Жыл бұрын
One of the rarest live coding video that I watched till the end. Keep up the good work bro, you just earned a subscriber!
@RoadsideCoder
@RoadsideCoder Жыл бұрын
🙏
@sandeshpetkar568
@sandeshpetkar568 Жыл бұрын
Your videos are awesome please continue making the front end interview coding series
@ANANDKUMAR-in3pc
@ANANDKUMAR-in3pc 21 күн бұрын
With the help of your video and your KZbin channel, I cracked the interview.
@usmanrangrez-cd7zj
@usmanrangrez-cd7zj 7 ай бұрын
Thank you. Another reasy approcah for disabling can be: CSS: :disabled { opacity: 0; } JSX: setPage((prev) => prev - 1)} disabled={page === 1} > Prev setPage((prev) => prev + 1)} disabled={page === noOfPages} > Next
@dacratos416
@dacratos416 Жыл бұрын
the best explanation video creator in development world thank u so much
@Ath9493
@Ath9493 Жыл бұрын
I did not know about BEM convention till now. Thanks
@abhisektripathy9864
@abhisektripathy9864 Жыл бұрын
Nicely Explained Bro . I am a new to the React .. good to know the stuff.
@ramkrushnaprabhu8027
@ramkrushnaprabhu8027 Жыл бұрын
Very nice video, i am learn many new things from your videos... Please create videos on backend development coding interview rounds... Thank you.
@anubhapant5227
@anubhapant5227 2 ай бұрын
Please make more such videos on machine coding. This content is just wonderful 🧡
@RoadsideCoder
@RoadsideCoder 2 ай бұрын
More here - roadsidecoder.com/course-details
@Krishnasaini
@Krishnasaini 10 ай бұрын
further enhancement - 1. instead of mapping Array(Product.length/10) , make it more generic so that in future if PM wants only 5 or 8 elements per page, this should be a simple change. above logic will fail for such edge cases 2. add key prop everytime you use map 3. add accessibility features like tabIndex, role, should be clickable via enter key 4. make it responsive
@devuthakkar1602
@devuthakkar1602 Жыл бұрын
Thanks. Need more videos like this.
@nileshkumar4547
@nileshkumar4547 5 ай бұрын
Amazing tutorial, very easy to understand !!
@koushithb.r3984
@koushithb.r3984 Жыл бұрын
Thank you. i just implimented this soluion in one of my side project :)
@sravan8643
@sravan8643 Жыл бұрын
Great explanation. Thank you :)
@ritikrathour8081
@ritikrathour8081 Жыл бұрын
Great! your teaching style is very good
@keshavkishorram7678
@keshavkishorram7678 Жыл бұрын
Thank you for this amazing content.
@purusharma8192
@purusharma8192 Жыл бұрын
Thanks a lot,please make videos on backend too
@priyankaphadtare3783
@priyankaphadtare3783 Жыл бұрын
Informative...Easy to understand.....Keep it up
@mohitsaud2071
@mohitsaud2071 Жыл бұрын
Nice to see your video again brother.
@farmanmohd2607
@farmanmohd2607 Жыл бұрын
It's amazing. Thanks bro
@perry8936
@perry8936 Жыл бұрын
i just watched a piece of gem great video applause to your effort thankyou buddy!!!
@RoadsideCoder
@RoadsideCoder Жыл бұрын
Much appreciated!
@jeetvora331
@jeetvora331 Жыл бұрын
Sublime explanation 😎😎
@abdu5822
@abdu5822 Жыл бұрын
please create more content on testing in React.
@aniketjain6886
@aniketjain6886 Жыл бұрын
Hello brother, all of your video is much much helpful just a free advice please manage your some playlist with the same .
@jhaeberli
@jhaeberli Жыл бұрын
Great content! thanks
@abdulrazzak2934
@abdulrazzak2934 3 ай бұрын
thanks alot bhai for this video ,
@tejaskulkarni7127
@tejaskulkarni7127 Жыл бұрын
Really good content. 😀
@ehsankabir5235
@ehsankabir5235 9 ай бұрын
Client side pagination is useless if you fetch all the data at once what's the point of pagination, you definitely should make a backend pagination functionality
@canra245
@canra245 11 ай бұрын
Ezz to understand, thanks
@anshphirani
@anshphirani Жыл бұрын
please make videos on React like this 🥰🥰
@abrahamouattara8757
@abrahamouattara8757 6 ай бұрын
thank you very much , 👍
@priyankaphadtare3783
@priyankaphadtare3783 Жыл бұрын
Please Do the series on JavaScript Design Patterns
@jatilyadav4000
@jatilyadav4000 Жыл бұрын
Great work
@kshitijsingh609
@kshitijsingh609 Жыл бұрын
Keep doing good work
@Dext-err
@Dext-err 9 ай бұрын
thank youu!!
@abdulrazzak2934
@abdulrazzak2934 3 ай бұрын
very informative
@gauravparihar6962
@gauravparihar6962 2 ай бұрын
great video
@srishtikhobragade7693
@srishtikhobragade7693 Жыл бұрын
very easy to follow , could you please video on code splitting and infinite scrolling
@RoadsideCoder
@RoadsideCoder Жыл бұрын
Yes
@VishalSharma-rn7mt
@VishalSharma-rn7mt 6 ай бұрын
Awesome
@trendingshorts9166
@trendingshorts9166 Жыл бұрын
Please one video upon react nested router dom
@samarscript5824
@samarscript5824 Жыл бұрын
14:03 const length = products.length/10 const array =Array.from({length}); It much better than taking Array Constructor
@fahadraza7152
@fahadraza7152 11 ай бұрын
where i put these line of code
@jaspersanchez7606
@jaspersanchez7606 Жыл бұрын
Thanks to you Man! Finally, I landed a job! :D
@RoadsideCoder
@RoadsideCoder Жыл бұрын
Congrats man!
@rishiraj2548
@rishiraj2548 10 ай бұрын
​@@RoadsideCoder🎉👍🙏
@samarthdevli6968
@samarthdevli6968 4 ай бұрын
Which company?
@khanasif1654
@khanasif1654 4 ай бұрын
How
@boogleba126
@boogleba126 Ай бұрын
5 mins in subbed ❤
@asynctushar
@asynctushar Жыл бұрын
Please make a next js project which will cover every topic.
@AlishaKhan-mq1nl
@AlishaKhan-mq1nl 9 ай бұрын
Please make 1 Playlist for backtracking in DSA for for beginning easy and hard question
@sachinpandey7751
@sachinpandey7751 2 ай бұрын
bro awesome
@shyammp6255
@shyammp6255 11 ай бұрын
Thank u sir
@SaiKumar-tg6ct
@SaiKumar-tg6ct 11 ай бұрын
Will you make a video on *onscroll* pagination
@himanshuarora1910
@himanshuarora1910 2 ай бұрын
3:23 we have to convert it into json or we have to convert it from json
@shakilahmed6870
@shakilahmed6870 8 ай бұрын
So what if you have 1000 products and you need 100 buttons for that. In that case you are not showing 100 button at once right? I dont know why all the pagination video on youtube skips this part.
@karthikvijay5
@karthikvijay5 9 ай бұрын
Hai I have one doubt when user refresh page that goes into our insial page how to Handel that thing
@shyammp6255
@shyammp6255 11 ай бұрын
I need interview tips from u
@zabiullah92
@zabiullah92 Жыл бұрын
Please make video on infinite scrolling also
@SushilKumar-xh1dv
@SushilKumar-xh1dv Жыл бұрын
you r awesome
@waqasrana5734
@waqasrana5734 Жыл бұрын
You are as cool as jonny bravo :D
@jeetudewangan9836
@jeetudewangan9836 Жыл бұрын
But it just changing the data not the page. whenever we click on next or prev button it just change the data and whenever user click on next or prev button page must start with top of the page and also page number should be change on url . How to achieve this?
@imranahmed3366
@imranahmed3366 Жыл бұрын
Same question I was asked yesterday in an interview
@Sai_ku_ma_r
@Sai_ku_ma_r 3 ай бұрын
Which company asked this question ❓
@anshumanxda
@anshumanxda Жыл бұрын
etcetera instead of etceptra, nice.
@rishiSingh0898
@rishiSingh0898 Жыл бұрын
i was not able to get that setTotalpages() in last, can anyone explain it to me?
@ashwinpatidar2878
@ashwinpatidar2878 9 ай бұрын
This one is better approach
@awais_ansarii
@awais_ansarii 6 ай бұрын
@rishiraj2548
@rishiraj2548 Жыл бұрын
Good day greetings
@heyyyyyworld
@heyyyyyworld 11 ай бұрын
Hello! Thanks for the video! I had one query, do companies expect us to code using react or vanilla JS during the machine coding round? Or is it our freedom to choose? Thanks in advance :)
@RoadsideCoder
@RoadsideCoder 11 ай бұрын
mostly there's freedom to choose, but in very rare cases they might ask u to do it in vanilla JS
@heyyyyyworld
@heyyyyyworld 11 ай бұрын
@@RoadsideCoder thanks!
@rishiraj2548
@rishiraj2548 10 ай бұрын
🙏👍
@thiagosoares5052
@thiagosoares5052 Жыл бұрын
Would it be possible for us to develop an application for android where we can make a launcher to change the face of android, I live in Brazil and although I don't speak and understand English I like your teaching. I will be grateful for the return
@shahhussain56
@shahhussain56 Жыл бұрын
great video bhai😊 and I am living in same location where you are living bro. 😅
@RoadsideCoder
@RoadsideCoder Жыл бұрын
That's great!
@hashirmughal5625
@hashirmughal5625 3 ай бұрын
Very good love form pakistan
@likhitverma9661
@likhitverma9661 Жыл бұрын
Please make video on Redux and Saga🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴
@rohithchittibommala2002
@rohithchittibommala2002 Жыл бұрын
any reason why you are preferring span over native button tag?
@RoadsideCoder
@RoadsideCoder Жыл бұрын
To explain "cursor : pointer" point
@JohnDavidO
@JohnDavidO 11 ай бұрын
In a situation where one product is returned instead of the whole or few products, this is will throw an error..
@IllIIIIIIllll
@IllIIIIIIllll 5 ай бұрын
Sir the faker sends only 2-3data 😭 pls reply
@franklinmayoyo
@franklinmayoyo Жыл бұрын
You went incognito mode 🤔
@RichaKejriwal
@RichaKejriwal 10 ай бұрын
why are we doing underscore, index inside map function?
@RoadsideCoder
@RoadsideCoder 10 ай бұрын
Its just a placeholder when we don't want to use that value
@RichaKejriwal
@RichaKejriwal 10 ай бұрын
@@RoadsideCoder okay, thanks. Aprreciate your reply. Hey, pls also make more videos of frequently asked machine coding questions and also system design for Frontend
@herry22
@herry22 Жыл бұрын
Hello sir, I need your help. Sir, do you have ER-Diagram, Tables, & 1 level DFD from your cryptocurrency tracker app? If you have please share it with me.
@RoadsideCoder
@RoadsideCoder Жыл бұрын
I dont have it. But u can try to make it. Will be easy
@herry22
@herry22 Жыл бұрын
@@RoadsideCoder sir i can't make it, I am little bit confuse about entity and attributes,that's why I told you
@herry22
@herry22 Жыл бұрын
@@RoadsideCoder if you can just give ER diagram and Tables, it would be very helpful.
@herry22
@herry22 Жыл бұрын
Hello sir, please reply I've to report it by Tomorrow
@BrijeshSingh-dp1ku
@BrijeshSingh-dp1ku Жыл бұрын
That etc. 😂
@divyanshurawat2422
@divyanshurawat2422 Жыл бұрын
What if there are 500 posts then there will be around 50 pages and how would we display the pagination
@piyush6631
@piyush6631 7 ай бұрын
Don’t display all of them. Display current, a few previous, next pages and last page. See how google does it
@prabhatkashyap8333
@prabhatkashyap8333 10 ай бұрын
bhai you took 24 mins to make this suppose if we need to make this in machine coding round how much time we will get? coz sometimes it takes time to thing for logic and some time for CSS google search as well.
@RoadsideCoder
@RoadsideCoder 10 ай бұрын
U will atleast have 1 hour
@prabhatkashyap8333
@prabhatkashyap8333 10 ай бұрын
@@RoadsideCoder ok bro and what if we have DSA round online OA then can we use JAVA as coding language? or do we have to use JS only?
@debojitsaha5884
@debojitsaha5884 5 ай бұрын
setTotalPages(data.total/10) should be setTotalPages(Math.floor(data.total / 10)) so that totalPages would be a whole number.
@IllIIIIIIllll
@IllIIIIIIllll 5 ай бұрын
Bro did you do this project?
@shashank3758
@shashank3758 2 ай бұрын
IT WILL BE MATH.CEIL() otherwise we will lost the data of few products .
@rakeshkharvi4145
@rakeshkharvi4145 Жыл бұрын
Hitting like a button before watching video
@elias-soykat
@elias-soykat Жыл бұрын
It's not an efficient way pagination. Because you get all the products by single api call..
@karanbhoite9552
@karanbhoite9552 Жыл бұрын
[...Array(products.length/10)].map......... and what if data length is 99 instead of 100 It would work as [ ...Array(9.9) ].map... which is invalid .... a slight change as below ... [...Array(Math.ceil(products.length/10))].map......
@ItsEskimo
@ItsEskimo Жыл бұрын
It's still throwing invalid error length
@raki0125
@raki0125 Жыл бұрын
why in map(_ ,1) pls someone explain
@softwareengineering101
@softwareengineering101 Жыл бұрын
Here we only need those index not the element. so we are simply putting _ in the place of array element
@karanbhoite9552
@karanbhoite9552 Жыл бұрын
instead of _ u can put anything u want although there is no use of that.
@sunilsarode152
@sunilsarode152 5 ай бұрын
why you have so less subscriber ?
@RoadsideCoder
@RoadsideCoder 5 ай бұрын
because you haven't shared this video on linkedin yet 🥹
@pixel631me
@pixel631me Жыл бұрын
bhai hindi me kyon video nahi banate ho
@Leo-jh3nj
@Leo-jh3nj 11 ай бұрын
90年代末2000年初, 在华为中兴 当 leader 研发中心 当 leader 一年二三十w,在所谓的西安家人亲属 眼中 远远不如 国企事业单位每月6-
@zaurhuseyn4432
@zaurhuseyn4432 8 ай бұрын
I don’t understand what you say,im sorry)
@Colours_and_Crafts
@Colours_and_Crafts 3 ай бұрын
[...Array (products.length/10)] throw error 'invalid array length' NaN
@ItsEskimo
@ItsEskimo Жыл бұрын
{typeof tradeDetails?.result?.docs?.length === 'number'&& new Array(Math.ceil(tradeDetails?.result?.docs?.length / 4)).fill(0).map((_,i)=>{i+1})}
@usa5450
@usa5450 Жыл бұрын
Too difficult and impractical questions. I don't think anyone asks this in interviews
FOOTBALL WITH PLAY BUTTONS ▶️ #roadto100m
00:29
Celine Dept
Рет қаралды 72 МЛН
Cat story: from hate to love! 😻 #cat #cute #kitten
00:40
Stocat
Рет қаралды 12 МЛН
Glow Stick Secret 😱 #shorts
00:37
Mr DegrEE
Рет қаралды 143 МЛН
Top 100 React JS Interview Questions and Answers
3:10:07
Interview Happy
Рет қаралды 126 М.
2.5 Years Experienced Best JavaScript Interview
2:03:06
Anurag Singh ProCodrr
Рет қаралды 125 М.
React JS interview 2023 Live Coding Round (Mock)
18:33
Coder Dost
Рет қаралды 282 М.
React Interview Questions and Answers - Dominate Your Next Interview
45:43
Monsterlessons Academy
Рет қаралды 20 М.
FOOTBALL WITH PLAY BUTTONS ▶️ #roadto100m
00:29
Celine Dept
Рет қаралды 72 МЛН