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

Поділитися
Вставка
  • Опубліковано 15 жов 2024

КОМЕНТАРІ • 141

  • @RoadsideCoder
    @RoadsideCoder  Рік тому +8

    🔴 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 Рік тому

      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

  • @usmanrangrez-cd7zj
    @usmanrangrez-cd7zj Рік тому +3

    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

  • @navvneat
    @navvneat Рік тому +15

    One of the rarest live coding video that I watched till the end.
    Keep up the good work bro, you just earned a subscriber!

  • @anubhapant5227
    @anubhapant5227 6 місяців тому +2

    Please make more such videos on machine coding. This content is just wonderful 🧡

    • @RoadsideCoder
      @RoadsideCoder  6 місяців тому

      More here - roadsidecoder.com/course-details

  • @Sandeep-zd6dq
    @Sandeep-zd6dq Рік тому +5

    Now I am addicted to your content 😂 Amazing video on Frontend drived pagination 😎🙌

  • @ANANDKUMAR-in3pc
    @ANANDKUMAR-in3pc 5 місяців тому

    With the help of your video and your UA-cam channel, I cracked the interview.

  • @ehsankabir5235
    @ehsankabir5235 Рік тому +3

    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

  • @Krishnasaini
    @Krishnasaini Рік тому +4

    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

  • @jaspersanchez7606
    @jaspersanchez7606 Рік тому +24

    Thanks to you Man! Finally, I landed a job! :D

  • @harshmodi8654
    @harshmodi8654 3 місяці тому

    great playlist, binging your channel since last few days :) Plese keep up the good work

  • @shakilahmed6870
    @shakilahmed6870 Рік тому +4

    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.

  • @ramkrushnaprabhu8027
    @ramkrushnaprabhu8027 Рік тому +2

    Very nice video, i am learn many new things from your videos...
    Please create videos on backend development coding interview rounds... Thank you.

  • @abhisektripathy9864
    @abhisektripathy9864 Рік тому +1

    Nicely Explained Bro . I am a new to the React .. good to know the stuff.

  • @Ath9394
    @Ath9394 Рік тому

    I did not know about BEM convention till now. Thanks

  • @asmitabiswas442
    @asmitabiswas442 3 місяці тому +1

    Brother, You are live saver Dude

  • @sandeshpetkar568
    @sandeshpetkar568 Рік тому +1

    Your videos are awesome please continue making the front end interview coding series

  • @devuthakkar1602
    @devuthakkar1602 Рік тому +2

    Thanks. Need more videos like this.

  • @priyankaphadtare3783
    @priyankaphadtare3783 Рік тому +1

    Informative...Easy to understand.....Keep it up

  • @dacratos416
    @dacratos416 Рік тому

    the best explanation video creator in development world thank
    u so much

  • @ninjaplavi
    @ninjaplavi Рік тому +1

    Thank you, man! Always relevant content, well explained and structured.

  • @purusharma8192
    @purusharma8192 Рік тому +2

    Thanks a lot,please make videos on backend too

  • @devascript
    @devascript 3 місяці тому

    Bro you are unique, i love you brother , keep grow with us brother❤

  • @ritikrathour8081
    @ritikrathour8081 Рік тому +1

    Great! your teaching style is very good

  • @samarscript5824
    @samarscript5824 Рік тому +1

    14:03
    const length = products.length/10
    const array =Array.from({length});
    It much better than taking Array Constructor

  • @nileshkumar4547
    @nileshkumar4547 9 місяців тому

    Amazing tutorial, very easy to understand !!

  • @himanshuarora1910
    @himanshuarora1910 6 місяців тому +1

    3:23 we have to convert it into json or we have to convert it from json

  • @mohitsaud2071
    @mohitsaud2071 Рік тому

    Nice to see your video again brother.

  • @koushithb.r3984
    @koushithb.r3984 Рік тому

    Thank you. i just implimented this soluion in one of my side project :)

  • @heyyyyyworld
    @heyyyyyworld Рік тому +1

    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  Рік тому +1

      mostly there's freedom to choose, but in very rare cases they might ask u to do it in vanilla JS

    • @heyyyyyworld
      @heyyyyyworld Рік тому

      @@RoadsideCoder thanks!

  • @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?

  • @perryog2205
    @perryog2205 Рік тому

    i just watched a piece of gem great video applause to your effort thankyou buddy!!!

  • @kashmirtechtv2948
    @kashmirtechtv2948 6 днів тому

    Why did you use Array keyword and spread the array??? ...Array
    14:43

  • @abdu5822
    @abdu5822 Рік тому +1

    please create more content on testing in React.

  • @m.h.wasimelahi3878
    @m.h.wasimelahi3878 4 місяці тому

    Can you make a video on a problem which is ehen we hover on the picture it will only zoom in that part of pic but do not increase the whole scale of the pic

  • @srishtikhobragade7693
    @srishtikhobragade7693 Рік тому +1

    very easy to follow , could you please video on code splitting and infinite scrolling

  • @karthikvijay5
    @karthikvijay5 Рік тому

    Hai I have one doubt when user refresh page that goes into our insial page how to Handel that thing

  • @farmanmohd2607
    @farmanmohd2607 Рік тому

    It's amazing. Thanks bro

  • @SaiKumar-tg6ct
    @SaiKumar-tg6ct Рік тому

    Will you make a video on *onscroll* pagination

  • @tejaskulkarni7127
    @tejaskulkarni7127 Рік тому +1

    Really good content. 😀

  • @anshphirani
    @anshphirani Рік тому

    please make videos on React like this 🥰🥰

  • @sravan8643
    @sravan8643 Рік тому

    Great explanation. Thank you :)

  • @prabhatkashyap8333
    @prabhatkashyap8333 Рік тому

    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  Рік тому +1

      U will atleast have 1 hour

    • @prabhatkashyap8333
      @prabhatkashyap8333 Рік тому

      @@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?

  • @jeetvora331
    @jeetvora331 Рік тому

    Sublime explanation 😎😎

  • @Khan786Alisha
    @Khan786Alisha Рік тому

    Please make 1 Playlist for backtracking in DSA for for beginning easy and hard question

  • @priyankaphadtare3783
    @priyankaphadtare3783 Рік тому

    Please Do the series on JavaScript Design Patterns

  • @aniketjain6886
    @aniketjain6886 Рік тому

    Hello brother, all of your video is much much helpful just a free advice please manage your some playlist with the same .

  • @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

  • @imranahmed3366
    @imranahmed3366 Рік тому +1

    Same question I was asked yesterday in an interview

    • @Sai_ku_ma_r
      @Sai_ku_ma_r 7 місяців тому

      Which company asked this question ❓

  • @JohnDavidO
    @JohnDavidO Рік тому

    In a situation where one product is returned instead of the whole or few products, this is will throw an error..

  • @abdulrazzak2934
    @abdulrazzak2934 8 місяців тому

    thanks alot bhai for this video ,

  • @canra245
    @canra245 Рік тому

    Ezz to understand, thanks

  • @harshitapaliwal7566
    @harshitapaliwal7566 2 місяці тому

    Thanks well taught

  • @shahhussain56
    @shahhussain56 Рік тому

    great video bhai😊 and I am living in same location where you are living bro. 😅

  • @rishiSingh0898
    @rishiSingh0898 Рік тому

    i was not able to get that setTotalpages() in last, can anyone explain it to me?

  • @asynctushar
    @asynctushar Рік тому

    Please make a next js project which will cover every topic.

  • @jhaeberli
    @jhaeberli Рік тому

    Great content! thanks

  • @divyanshurawat2422
    @divyanshurawat2422 Рік тому

    What if there are 500 posts then there will be around 50 pages and how would we display the pagination

    • @piyush6631
      @piyush6631 Рік тому

      Don’t display all of them. Display current, a few previous, next pages and last page. See how google does it

  • @RichaKejriwal
    @RichaKejriwal Рік тому

    why are we doing underscore, index inside map function?

    • @RoadsideCoder
      @RoadsideCoder  Рік тому +2

      Its just a placeholder when we don't want to use that value

    • @RichaKejriwal
      @RichaKejriwal Рік тому

      @@RoadsideCoder okay, thanks. Aprreciate your reply. Hey, pls also make more videos of frequently asked machine coding questions and also system design for Frontend

  • @IllIIIIIIllll
    @IllIIIIIIllll 10 місяців тому

    Sir the faker sends only 2-3data 😭 pls reply

  • @kshitijsingh609
    @kshitijsingh609 Рік тому

    Keep doing good work

  • @boogleba126
    @boogleba126 5 місяців тому +1

    5 mins in subbed ❤

  • @tiwariji7598
    @tiwariji7598 3 місяці тому

    Thank you man

  • @anshumanxda
    @anshumanxda Рік тому

    etcetera instead of etceptra, nice.

  • @zabiullah92
    @zabiullah92 Рік тому

    Please make video on infinite scrolling also

  • @jatilyadav4000
    @jatilyadav4000 Рік тому

    Great work

  • @shyammp6255
    @shyammp6255 Рік тому

    I need interview tips from u

  • @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  Рік тому +1

      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

  • @abdulrazzak2934
    @abdulrazzak2934 8 місяців тому

    very informative

  • @hashirmughal5625
    @hashirmughal5625 7 місяців тому

    Very good love form pakistan

  • @abrahamouattara8757
    @abrahamouattara8757 11 місяців тому

    thank you very much , 👍

  • @waqasrana5734
    @waqasrana5734 Рік тому

    You are as cool as jonny bravo :D

  • @TrendingShorts-5G
    @TrendingShorts-5G Рік тому

    Please one video upon react nested router dom

  • @ashwinpatidar2878
    @ashwinpatidar2878 Рік тому

    This one is better approach

  • @gauravparihar6962
    @gauravparihar6962 7 місяців тому

    great video

  • @rohithchittibommala2002
    @rohithchittibommala2002 Рік тому

    any reason why you are preferring span over native button tag?

  • @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

  • @VishalSharma-rn7mt
    @VishalSharma-rn7mt 10 місяців тому

    Awesome

  • @sachinpandey7751
    @sachinpandey7751 7 місяців тому

    bro awesome

  • @Dext-err
    @Dext-err Рік тому

    thank youu!!

  • @debojitsaha5884
    @debojitsaha5884 10 місяців тому

    setTotalPages(data.total/10) should be setTotalPages(Math.floor(data.total / 10)) so that totalPages would be a whole number.

    • @IllIIIIIIllll
      @IllIIIIIIllll 10 місяців тому

      Bro did you do this project?

    • @shashank3758
      @shashank3758 6 місяців тому

      IT WILL BE MATH.CEIL() otherwise we will lost the data of few products .

  • @shyammp6255
    @shyammp6255 Рік тому

    Thank u sir

  • @rakeshkharvi4145
    @rakeshkharvi4145 Рік тому

    Hitting like a button before watching video

  • @SushilKumar-xh1dv
    @SushilKumar-xh1dv Рік тому

    you r awesome

  • @likhitverma9661
    @likhitverma9661 Рік тому

    Please make video on Redux and Saga🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴

  • @awais_ansarii
    @awais_ansarii 11 місяців тому

  • @rishiraj2548
    @rishiraj2548 Рік тому

    Good day greetings

  • @elias-soykat
    @elias-soykat Рік тому

    It's not an efficient way pagination. Because you get all the products by single api call..

    • @sujalsharma487
      @sujalsharma487 Місяць тому

      thats api issue, api should have the query to fetch max 10-15 products at a time.

  • @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.

  • @rishiraj2548
    @rishiraj2548 Рік тому

    🙏👍

  • @Colours_and_Crafts
    @Colours_and_Crafts 8 місяців тому

    [...Array (products.length/10)] throw error 'invalid array length' NaN

  • @franklinmayoyo
    @franklinmayoyo Рік тому

    You went incognito mode 🤔

  • @sunilsarode152
    @sunilsarode152 10 місяців тому

    why you have so less subscriber ?

    • @RoadsideCoder
      @RoadsideCoder  10 місяців тому

      because you haven't shared this video on linkedin yet 🥹

  • @BrijeshSingh-dp1ku
    @BrijeshSingh-dp1ku Рік тому

    That etc. 😂

  • @pixel631me
    @pixel631me Рік тому

    bhai hindi me kyon video nahi banate ho

  • @Leo-jh3nj
    @Leo-jh3nj Рік тому

    90年代末2000年初, 在华为中兴 当 leader 研发中心 当 leader 一年二三十w,在所谓的西安家人亲属 眼中 远远不如 国企事业单位每月6-

  • @zaurhuseyn4432
    @zaurhuseyn4432 Рік тому

    I don’t understand what you say,im sorry)

  • @kashmirtechtv2948
    @kashmirtechtv2948 6 днів тому

    Bnany ka msla ni ha bro... Ab sari game Smjhny ki ha

  • @ItsEskimo
    @ItsEskimo Рік тому

    {typeof tradeDetails?.result?.docs?.length === 'number'&& new Array(Math.ceil(tradeDetails?.result?.docs?.length / 4)).fill(0).map((_,i)=>{i+1})}

  • @unboxverse9038
    @unboxverse9038 24 дні тому

    bhai itni video editing or planning k bad you are able to do it in 25 min approx , agr real scenario k hisab se adjust kre to it would take an average coder 40-50 mins to do same amount of coding that you did here with all sort of planning and editing or wo bhi jb sab kuch use rta hua ho, and stil some time goes in handling error ....... to kis angle se hum is bat ko digest kre ki interview ek question /hr k hisab se chlega ........... koi sense ha is bat ka and your every video says ye bhi pucha jata ha , with atleast half hour coding .... mtlb bhai kuch bhi ????????????????

    • @RoadsideCoder
      @RoadsideCoder  24 дні тому

      1 hr ka minimum time hota hai.
      Also, its not just u, sabko milta hai aur sab krte bhi hai. So try to get better in managing time.

    • @AbhishakKumar-03
      @AbhishakKumar-03 20 днів тому

      3hrs thodi milenge tujhe bhai iske liye

  • @usa5450
    @usa5450 Рік тому

    Too difficult and impractical questions.
    I don't think anyone asks this in interviews

    • @te083tejaspatil8
      @te083tejaspatil8 2 місяці тому

      What this is the easiest one, but the truncated version of pagination is way harder than this