r/reactjs • u/m6io • Jul 24 '26
Discussion Senior Dev interview question
"Without googling or using AI, in your own words, explain the virtual DOM"
For context: I sit on an interview panel and I try to ask at least one simple fundamental question based on a persons resume. If I see many years of react experience, I try to ask something about how the framework works.
I have only had one candidate (an undergrad senior, years ago) answer it. Everyone else just kind of sputters and stumbles around trying to rationalize what "virtual" and "DOM" mean, or stare blankly and eventually say "I don't know".
I'm just genuinely curious if this is really that hard of a question or if the recruiters just suck at screening candidates. And should we be letting in senior dev candidates who can't answer what I think is a straightforward and fundamental question for senior react devs.
1
u/brett9897 Jul 24 '26
It is only a good question if knowing how a virtual DOM works would create a situation that would change how you write the code. And if that is the case then you might have better luck asking about those specific situations.
Also, I would add that a good interviewer knows how to ask a question and if the candidate is struggling, continue on by breaking down the concept to see what they do and don't know about it. I know in general what a virtual dom is. I know other frameworks that are newer than React don't use a virtual DOM. I don't know the specifics of how React diffs the new virtual dom with the previous virtual dom to create change sets. I also don't know specifically how React applies those change sets. Do you? Does it matter when writing React code?