r/learnjavascript • • Sep 04 '26 • Bravo 2

10 React.js Questions that you definitely should practice before your live-coding interviews.

45 Upvotes

11 comments sorted by

3

u/chikamakaleyley helpful Sep 05 '26 edited Sep 05 '26

i would say that 8 times out of 10 the problem is usually some form of:

  • here is an API GET endpoint
  • fetch data from it
  • display the response as Items in a List

Then usually there's a number of follow ups, at a minimum you're asked to filter it in some way, either thru search or maybe checkboxes

THEN, there's usually enough time, given an hour-ish interview session to demonstrate any of the following patterns/techniques:

  • useCallback or
  • a typical callback pattern
  • debounce

If anything, Counter is prob the least likely as it often is what is bootstrapped as part of a base React FE init. Like, I'm pretty sure firing up a fresh Vite React project will give you the Counter increment/decrement on the home page

One little tricky one i've seen time to time is the pattern where you have to make sure to destroy the fn you created at the end of a hook, i don't remember what that's called but I've seen it once or twice

And I've seen this type of problem for Senior roles.

the other 2 times, its usually

  • here is a broken form, how would you fix it
  • how would you improve this form

1

u/chikamakaleyley helpful Sep 05 '26

and regardless if for interview prep, you should just know how to do this already.

fetch -> response -> display items as list

is like one of the things you do in React frontends ALL.THE.TIME.

2

u/TheDarkPanda182 Sep 04 '26

Very much appreciated! Add these to my list of interview drills to cover

2

u/Aggressive-Nail7816 Sep 05 '26

One thing I'd emphasize don't just practise implementing these. Parctise explaining why your solution works and what edge cases you considered. In a live- coding interview, that's often more valuable than typing speed

0

u/[deleted] Sep 05 '26

[deleted] — view deleted comment

1

u/chikamakaleyley helpful Sep 05 '26

that's what it was, listener cleanup!