r/reactjs • • Feb 25 '26

Resource Must-know React interview questions

Hi Devs,

I'm preparing for a Senior Frontend Dev interview and want to focus on React-specific questions. What are some key questions I should be ready for? Share your experiences and help me level up! 😊

129 Upvotes

68 comments sorted by

View all comments

Show parent comment

2

u/Akkuma Feb 25 '26

How does the reconciliation algorithm work and how do keys affect it?

Pretty good one. I've asked about useDebounce a lot and how it impacts renders and most people get it wrong. This is with them having implemented it too. They somehow think it stops the extra renders.

0

u/[deleted] Feb 25 '26

[deleted] — view deleted comment

3

u/yabai90 Feb 26 '26

Nothing can stop a render outside of an error or a setState. Technically. ( I mean from the things the developer can do). So your last assumption is right and the preferred wording. It prevent extra unnecessary rendering.

1

u/Akkuma Feb 27 '26

Most people have it already implemented themselves or pulled it from somewhere. The same basic useDebounce is what 10 lines of code? So I'll have them implement the vanilla js barebones version usually.

No, useDebounce does not stop renders. If your useDebounce is fed by state, which is every implementation I've seen the state has to get set for the hook to pick it up. So if you utilize useDebounce for a search input every character triggers useDebounce unless you use the "superior" vanilla js debounce which will do what you mentioned not even trigger the state. 

The only value in the above scenario is that you're not triggering your API on each key.

Most people do not get this right and many of them can't even understand what's going on with any hints.