ReactDOM ?? Virtual DOM

Yağız Aydın
2 min readMay 30, 2022

What is DOM ?
The Document Object Model (DOM) connects web pages to scripts or programming languages by representing the structure of a document the HTML representing a web page in memory.

All these html, head, body, div, script are DOM elements

What is Node ?
A DOM document is a hierarchical collection of nodes. Each node can have a parent and/or children.

Each node on the tree is an object representing an HTML element.

What is Virtual DOM ? 🤔

A Virtual DOM object is a representation of the real DOM object that exists in memory. This serves as a backbone for React for all DOM processing.

On Virtual DOM manipulations affects only changing nodes.

Also, You can see the magic on inspector screen when you clicking a button on some child component of ReactDOM.

ReactDOM locates difference between previous nodes and next nodes

ReactDOM is an object which exposes a number of top-level APIs to interact with the browser DOM. According to the docs, it provides ‘DOM-specific methods that can be used at the top level of your app and as an escape hatch to get outside of the React model if you need to’.
need to.

I hope I could help ❤️ ReactDOM

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

Yağız Aydın
Yağız Aydın

No responses yet