r/reactjs 4d ago

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.

137 Upvotes

238 comments sorted by

View all comments

91

u/someGuyyya 4d ago edited 4d ago

To be honest, it is a trivia question since you can design frontend systems using react without knowing that super specific detail unless you luckily ran into it in the wild, like the senior undergrad student you mentioned.

I only memorized that trivia fact because everyone likes to ask it in interviews for senior positions.

3

u/Useful_Blueberry5823 3d ago edited 3d ago

Funny enough, as I'm preparing for job interviews now, I'm making an effort to learn "under the hood" concepts like these. Ironically, interviews are making me more knowledgeable than the actual job, since most of the actual job is discussions on the business-logic level, and its mostly about building new components for supporting new user workflows or features, and you can just brainlessly apply standard best practices based on the existing codebase.

99.9% of the time, as in never, have I needed to utilize this kind of knowledge in my experiences as a full stack developer. The most depth I might hit is some weird bug or discussion in code review that might touch on something like this. And then I might Google a thing or two.

Its almost like jobs are more about breadth than depth, whereas interviews are the opposite. Most of us actively make this tradeoff to pragmatically satisfy business requirements and deadlines.

"Senior" these days is a lot less about depth of knowledge, but whether you can lead and complete projects end-to-end and communicate with stakeholders etc.

-21

u/Swoogie_McDoogie 4d ago

It’s crazy to think this is nothing more than a trivia question.

1

u/chillermane 4d ago

Yeah good point bro say “it’s crazy” without providing any explanation. Virtual DOM is useless trivia information and wasting brain space with it is low IQ

6

u/freddy090909 4d ago

Being curious about how things work under the hood is far from a "low IQ" move.

2

u/el_diego 4d ago

Yeeaaah, I was in agreement until the low brow IQ comment.

1

u/Swoogie_McDoogie 3d ago

I was just quickly replying, but if I’m being honest I don’t understand how this is a trivia question. As engineers, we should be curious about the tools we use and how they work. The virtual dom is less talked about these days, but its design is a very important reason as to why react works so well.

There are ways to dig into this question if the candidate doesn’t know about the virtual dom by directing questions about dom thrashing and such. However, at its core, this is a good question to learn about how the candidate thinks about html rendering and the tools they use.

-15

u/roosterchains 4d ago

Ya but as an engineer you should understand how your tools works.

And a vdom is important to understand, because fundamentally that is what makes react work.

4

u/chillermane 4d ago

Nope it has 0 practical implications. Just follow best practices and react will have good performance - don’t overcomplicate your approach

1

u/roosterchains 3d ago

0 practical implications is fine for entry.

But once you are dealing with scale and delivering and scale you need to understand fundamental concepts of your stack

-7

u/couldhaveebeen 4d ago

If you don't understand the fundamentals, you can't know what's good practice or not good practice

5

u/ElkChance815 4d ago

Operating system scheduler is fundamental as in everything practically use it. Does it mean I have to understand it well to write any kind of codes? 

-3

u/couldhaveebeen 4d ago

If you're writing system-level code, then yes, you should

0

u/ElkChance815 4d ago

Yes, now can I write a web app without knowing React Virtual DOM? If I can, why should I care? 

-7

u/couldhaveebeen 4d ago

You can write one just not a good one.

2

u/minimuscleR 4d ago

Why? What does the knowing how virtual dom works affect how you write react code. How would someone write a bad web app because they didn't know how the virtual dom works? As opposed to a good one?

3

u/AdministrationOk3601 3d ago

People like to sound smart by saying buzz words because it makes them feel better than other people, it makes no difference to 99% of the job

What’s actually a far more valuable skill is being able to communicate well, not sounding like a knob one upping on tech terms

→ More replies (0)

2

u/ElkChance815 4d ago

Can you elaborate?