React Hackerrank Coding Challenge | MNC React Hackerrank Challenge | Hackerrank React Test

แชร์
ฝัง
  • เผยแพร่เมื่อ 21 ก.ย. 2022
  • This is React Hackerrank Coding Challenge of 90 min. Same question can be asked in first round of screening test in many MNC companies.
    My Social Media Link
    Facebook Page:- / kodewithvishal
    Instagram:- / code_withvishal
    You can also BuyMeCoffee if you like these interview. I will keep bringing interview video from Product and MNC based company.
    www.buymeacoffee.com/CodeWith... or
    ko-fi.com/codewithvishal
    Please subscribe this channel on the topic related to React & Redux Concept

ความคิดเห็น • 7

  • @rogersanctos
    @rogersanctos ปีที่แล้ว +7

    The problem was with the disabled state of the buttons. The stage property of each task is the same as the index of the stage in both stagesNames and stagesTasks arrays. Instead of checking for the stage property in the array of tasks names (strings only, not objects) you should only check if the stage value is 0 for the first stage (disabling the back button) or the (length - 1) of any stages[...] array (this last case disables the forward button).
    Also, you dont need a for loop to change the stage of the task, all u need to apply a stage change to force a render is to reassign the state. So you could do: task.stage++ for moveForward and task.stage-- to moveBack and then just assign it on the copyState at the index of the task and then call setState with the copyState updated. There is no need for that 'for' loop. You made it and anyway made the change on the task from the parameter, leaving the local 's' constant untouched.

  • @RealParadox85
    @RealParadox85 10 วันที่ผ่านมา

    Is there a way to console.log as you code? Am I the only one who does this? I try to console.log on hackerrank and it never works, so I can never tell if my functions being reached, like even if i have an onclick for button to console.log, nothing happens

  • @SouravSantra-pe8id
    @SouravSantra-pe8id 9 หลายเดือนก่อน +2

    Please add your voice instead of music. It will be better for us to understand. Anyway thanks .

  • @richa3350
    @richa3350 หลายเดือนก่อน

    Hi @codewithVishal, Are these similar React challenge exercises available for access and practice on hackerrank?

  • @roldy7534
    @roldy7534 ปีที่แล้ว +2

    where is this challenge? I can't find any of the react challenges

    • @MikeNeder
      @MikeNeder 6 หลายเดือนก่อน +3

      agree. I was surprised with a react challenge on hacker rank. I wanted to go into hacker rank to see what types of react challenges the have, but cannot find them. I think maybe they are closed off to people who want to practice them, and only provide them to employers

    • @MikeNeder
      @MikeNeder 6 หลายเดือนก่อน

      agree. I was surprised with a react challenge on hacker rank. I wanted to go into hacker rank to see what types of react challenges the have, but cannot find them. I think maybe they are closed off to people who want to practice them, and only provide them to employers