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

Поділитися
Вставка
  • Опубліковано 5 лют 2025
  • 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.buymeacoff... or
    ko-fi.com/code...
    Please subscribe this channel on the topic related to React & Redux Concept

КОМЕНТАРІ • 10

  • @rogersanctos
    @rogersanctos Рік тому +9

    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.

  • @somos-futboleros
    @somos-futboleros 5 місяців тому

    I think the problem is when you want to move back in the first column or move forward in the last column, try "disabled={task.stage === 0 ? true : false}" and "disabled={task.stage === 3 ? true : false}"

  • @mrunalbhosale-h1z
    @mrunalbhosale-h1z 2 місяці тому

    where can i find more question on hackerrank to solve more of react? or anywhere to solve react questions? Please help

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

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

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

    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

  • @roldy7534
    @roldy7534 2 роки тому +2

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

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

      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

  • @SouravSantra-pe8id
    @SouravSantra-pe8id Рік тому +2

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