Question
What’s the difference between React and ReactDOM?
Answer
React is a JavaScript library for building User Interfaces and ReactDOM is the JavaScript library that allows React to interact with the DOM.
What’s the difference between React and ReactDOM?
React is a JavaScript library for building User Interfaces and ReactDOM is the JavaScript library that allows React to interact with the DOM.
I thought its an environment within react library that can interpret jsx into dom element
Think again.
As the name implies, ReactDOM is the glue between React and the DOM. For everything else, there’s React. You use React to define and create your elements, for lifecycle hooks, etc. i.e. the guts of a React application.
So, in brief:
I had the same perception
absolutely l agree react is JS library and React DOM is utility web app
Okay React is used for building the UI
And ReactDOM is used for maintaining the DOM
Makes sense
React is the js library for creating user interfaces, while i like to think of ReactDom as the virtual house that allows us to connect to the DOM virtually, correct me if I’m wrong