React Hooks Interview Questions and answers | Top Commonly Asked

Поделиться
HTML-код
  • Опубликовано: 2 окт 2024

Комментарии • 78

  • @yakohere
    @yakohere 4 года назад +140

    There is only 30 minutes left to my react interview to start, wish me luck!
    edited:
    I got the job!

    • @Nathan-pu9um
      @Nathan-pu9um 3 года назад

      whatd they ask?

    • @yakohere
      @yakohere 3 года назад +7

      @@Nathan-pu9um javascript, es6, react hooks, redux, lifecycle methods, prototypes, class, closure, this keyword, hoc

    • @revathikumar5027
      @revathikumar5027 3 года назад

      @@yakohere what coding challenge they given ?

    • @SuperBlackBeto
      @SuperBlackBeto 3 года назад

      @@yakohere What codding challenge did the give you? :D

    • @yakohere
      @yakohere 3 года назад +1

      @@SuperBlackBeto come to my channel

  • @manasiroy9510
    @manasiroy9510 4 года назад +6

    Thank you very much, Sir. This video is really helpful for me. One thing I want to share with you - whenever I stuck to anything related React or Javascript - I always check your video first and It's always helping me a lot. Thank you for helping me.

    • @Techsithtube
      @Techsithtube  4 года назад +2

      Thanks Mansi , I am glad that its helping you . Keep on learning!

  • @tambolaking5383
    @tambolaking5383 4 года назад +7

    Congrats on the sponsorship

  • @dastngoldenboy5016
    @dastngoldenboy5016 4 года назад +3

    Adding explanation about getDerivedStateFromProps and getSnapshotBeforeUpdate into video would be great
    Anyway, thanks for your time

  • @maximtsylko5987
    @maximtsylko5987 4 года назад +2

    Good video but I would argue about simplicity of hooks. For example, returning a callback from a callback doesn't look simpler than componentWillUnmount.

  • @oingkutv1270
    @oingkutv1270 4 года назад

    Hello, I'm Korean RUclips Oingku TV.I have a daily vlog channel.This time, a new content, video letter content is in progress.I hope you have the opportunity to write a letter.Have a good day todayAnd I will be a great youtuber like you.Thank you

  • @yogeshbhatt9383
    @yogeshbhatt9383 3 года назад +3

    I have an interview this eve. Wish me luck :)

    • @Techsithtube
      @Techsithtube  3 года назад

      Good luck Yogesh, I hope you get it.

  • @saraalsayed4526
    @saraalsayed4526 4 года назад

    Awesome! Thank you for making useful videos always .

  • @DigvijayGuptaofficialdk
    @DigvijayGuptaofficialdk 9 месяцев назад

    00:06 React Hooks Interview Questions
    01:50 Use Dashlane for secure form filling and password management
    03:27 React Hooks provide a simpler way to handle state and lifecycle features in functional programming.
    04:58 Hooks in React
    06:32 Hooks in React allow you to create custom hooks.
    08:12 When unmounting, instead of simply executing a function, hooks use a return statement to return a cleanup function.
    09:38 Upgrading React code requires converting class components into functional components and handling state and lifecycle methods properly.
    11:04 React interview tips and debugging techniques.
    Crafted by Merlin AI.

  • @StockDC2
    @StockDC2 4 года назад

    Hello, can you explain what you mean by "only call hooks from the top level"? Not calling hooks within nested functions and loops/conditions already takes care of this, no? Thanks!

  • @kshitijvengurlekar1192
    @kshitijvengurlekar1192 2 года назад

    Thanks

  • @StockDC2
    @StockDC2 4 года назад +2

    In addition, useEffect(() => {}, []) only runs once, similar to componentDidMount.

    • @Techsithtube
      @Techsithtube  4 года назад

      useEffect(() => {}, []) runs on initial render and updates. so its componentDidMount and componentDidupdate together. check out my video on useEffect to understand more.

    • @StockDC2
      @StockDC2 4 года назад +12

      @@Techsithtube I'm sorry but that is incorrect. With an empty "dependency list", it only runs when the component mounts and does not run any time the component rerenders.

    • @byVezro
      @byVezro 4 года назад

      StockDC2 ^

  • @rajatsharma280
    @rajatsharma280 4 года назад +1

    Hi sir
    Your tutorial helped me in clearing many concepts
    I am new to react hooks
    I am facing one issue .it will be great if you could help me around
    Q) I have a form on submit of which I have to display a table but on click of submit I have to call an get API ,API is like xyz/valid
    Now it checks value of email from the form API service becomes xyz/valid?email='sss.com'
    I am not getting how to code this using react hooks

    • @Techsithtube
      @Techsithtube  4 года назад +1

      Rajay, this is more of a redux issue than hooks issue. on submit you have an event. I have a tutorial on react redux and thunk , do check it out. also check out how to chain promises. that is what you have to do.

    • @rajatsharma280
      @rajatsharma280 4 года назад

      Hi Sir
      Thanks do you have any tutorial where we are storing our API response in stateprops and fetching the response to generate dynamic table

  • @rajashekhar433
    @rajashekhar433 4 года назад +5

    Looking for more deep and hard question
    2. Redux questions
    3. Looking for webpack configuration
    Thank you 🙏

  • @gabrielfono844
    @gabrielfono844 2 года назад

    since I can't provide anything.
    I dont remove ads. I am listening to all the ads to help techsit.

  • @hussaintayyab5516
    @hussaintayyab5516 4 года назад +1

    @techsith, I have recently given an interview based on javascript and the questions were quite difficult, where can I share the questions with u ? I have all the screenshots and code. Plz ur help will be appreciated.

    • @Techsithtube
      @Techsithtube  4 года назад

      you can email me the interview questions. You can find my email address on my channel page. Also you can share it on my facebook group so other people can answer them as well .

    • @hussaintayyab5516
      @hussaintayyab5516 4 года назад

      @@Techsithtube Ok I have emailed you the questions. I don't use Facebook so cannot post it there. Plz have a look at them and share the solution if u can. It will be really of great help to me.

  • @sundersinghaithani7235
    @sundersinghaithani7235 3 года назад

    So bad, within video you such long advertising video

  • @luthermaria1021
    @luthermaria1021 4 года назад

    Your Channel is Amazing please keep it

    • @Techsithtube
      @Techsithtube  4 года назад

      Luther, thanks for watching keep on learning!

  • @rajatverma8298
    @rajatverma8298 4 года назад +1

    Thanks for the video.. I'm having an interview tomorrow 😊

    • @Techsithtube
      @Techsithtube  4 года назад +1

      Good luck Rajat for the interview.

  • @fredteixeira3604
    @fredteixeira3604 3 года назад +1

    debugging with source maps.

    • @Techsithtube
      @Techsithtube  3 года назад

      Usually in dev environment you want to allow source maps so that user can debug the code.

    • @fredteixeira3604
      @fredteixeira3604 3 года назад

      @@Techsithtube Yes, I have a webpack.dev.js to create source maps in dev, and I have another webpack.prod.js to minify and scramble the code. This way I can have only in dev the original ES6 code deployed to the browser.

  • @SakthiVel-qd5qj
    @SakthiVel-qd5qj 3 года назад

    Hi sir, Are you from Chennai?

  • @Techsithtube
    @Techsithtube  4 года назад

    Download Dashlane for free on your first device by clicking here bit.ly/3893Z4H and automatically get a 30 day free trial of premium! No credit card required at signup!

  • @orz5516
    @orz5516 4 года назад

    any chance you will make angular interviews? and top questions ?

  • @DragonsPrasanth
    @DragonsPrasanth 2 года назад

    super super...

  • @seanpheneger6632
    @seanpheneger6632 4 года назад

    Love your videos and teaching style. Thank you for all your content.

  • @lokeshlm3279
    @lokeshlm3279 4 года назад

    Awesome series. this series enough to crack react interview. thank you very much

  • @fullStackInKannada
    @fullStackInKannada 3 года назад

    Nice, thank you :)

  • @rahulgolwalkar8843
    @rahulgolwalkar8843 3 года назад

    Actual video starts at 2:58

  • @atif5752
    @atif5752 3 года назад

    Thanks a lot for the video. I have 2 questions:
    1. Which is better performance wise? Class component or functional components?
    2. Can we do everything with functional component that we can do with class component?

    • @allthenew5227
      @allthenew5227 2 года назад

      1) Functional components
      2) Yes, almost all
      Why you are still not using functional components?

  • @tambolaking5383
    @tambolaking5383 4 года назад

    What does "call hooks at the top level" mean?

  • @vikasphougat3926
    @vikasphougat3926 4 года назад

    in 2020 react vs angular ,,which one you suggest ?

  • @durgaprasaddurgaprasad
    @durgaprasaddurgaprasad 4 года назад

    Hi, Sir, it is a very clear explanation and i am following all your videos regularly.
    I have one small question sir after React hooks come to the picture for that on words there is no stateless component right?
    Heart full thanks sir because of the videos we are learning very easily and developing ourself Thank you so much

    • @Techsithtube
      @Techsithtube  4 года назад +1

      Usually your top level component should be the stateful component where you hold the state and lower level components should be stateless components . With classes we used this.state but with hooks we are using useState hook. so its a same thing but different way.

  • @sivasubramanit8677
    @sivasubramanit8677 4 года назад

    Good video. But the comparison of equivalent life cycles methods for Hooks are not correct.

  • @hamidrezakazemi7746
    @hamidrezakazemi7746 4 года назад

    why cmpWillMount, cmpWillReceiveProps depricated?
    thanks for the video 👍❤

    • @Techsithtube
      @Techsithtube  4 года назад +1

      They were not safe and they were confusing

  • @sumanreddy5334
    @sumanreddy5334 4 года назад

    What will happen If I will call hooks inside if or for loop conditions??

    • @Techsithtube
      @Techsithtube  4 года назад +1

      It will throw an exception

    • @sumanreddy5334
      @sumanreddy5334 4 года назад

      Please rly apart from props how many ways we can pass data from parent to child components??

  • @saanvimadhukrit4185
    @saanvimadhukrit4185 4 года назад

    Can we use react hooks in class component?

    • @Techsithtube
      @Techsithtube  4 года назад +2

      You cant use hooks in class component. However , you can have function component in the same project and use hooks there.

  • @calistusobeke7520
    @calistusobeke7520 Год назад

  • @Noobmaster69_bro
    @Noobmaster69_bro 4 года назад

    its tomorrow...the interview...doomsday is near...stilllll y 2 use effect... and tat thing executes every time the component rendered for my app..when I used 2 useeffect it worked with api integration and everything...but y 2 useeffect... what to do with error handling...componentdidcatch was perfect... react community keeps doing these instabilities...still its simple to keep just a function..my grad freakin out...y interviews sucks

    • @Noobmaster69_bro
      @Noobmaster69_bro 4 года назад

      took me a while..but figured it out.... empty array "one time execution", one with props or states in array, side effect executes on change... now the last one y twice "if you want one time execution during mount, use empty array", after that need to execute it on change of props or state, add one more..as simple as tat..

    • @Noobmaster69_bro
      @Noobmaster69_bro 4 года назад

      Callback hooks used to prevent unwanted execution of callback props in child component... use Memo hook pretty much solves large data processing by returning cached data except on prop changes..

  • @karthikeyan-hz8sw
    @karthikeyan-hz8sw 3 года назад +1

    I'm a subscriber, but Sorry this one is not in your standard. No Answer I clear, I won't select you if I were the interviewer.

    • @Techsithtube
      @Techsithtube  3 года назад

      I see, need to understand what is the issue with my answers. How would you answer them ?

    • @karthikeyan-hz8sw
      @karthikeyan-hz8sw 3 года назад

      ​ @techsith First of all - Thanks for all your videos.
      Your answers are really simple. May be.. from a trainer like you.. I was expecting the explaination on what is hook before why hooks... and the problem it resolves...
      Also I couldn't accept just "simple and easier" as an answer for "why anything".
      Thanks Again!

  • @angelainniss7986
    @angelainniss7986 3 года назад

    informative but now im overwhelmed... 😭😬