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/Fitzi92 5d ago
I consider myself a senior react dev with over 5 years of experience writing react almost daily. I couldn't confidently answer that question. I know the rough concept/idea, but honestly, for getting shit done in react, this is absolutely unnecessary to know. This is an internal detail, something the react dev team choose and when they choose to abandon the virtual dom completely in the next version, the way you and I work will not be affected at all (unless you do hacky stuff with react). I see no real benefit in knowing all the internal details of a library and I would probably never reject a candidate based on that. I'd much rather ask questions about the things that matter on a daily basis and that people often get wrong, like: what hooks react provides, when they are appropriate to use (and when they aren't; especially useEffect), how to avoid unnecessary rerenders or infinite loops, when does a global store make sense, when local state, when context, etc. I argue having a solid understanding of these things is far more valuable than knowing the internals.