Tony Nguyen
1 min readApr 18, 2020

--

As my knowledge the image represent Virtual DOM and Browser DOM seem not right.
In Virtual DOM when the parent re-render (the top red node I named it VR1 ), the children (bottom red node I nam it VR2) is re-rendered as well (if its props from VR1 changed or they are not changed but we does not use PureComponent or some similar).
Bases on Virtual DOM and the “driff algorithm from React: https://reactjs.org/docs/reconciliation.html#the-diffing-algorithm)
the top red node from Browser DOM I name it BR1 will definitely be updated, but the bottom red node from Browser DOM I name it BR2 might or my not updated depend on VR2 is updated (mean return function in VR2 will generate different or same piece of HTML).

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

No responses yet

Write a response