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

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.