TIL - React vs ReactDOM- 1 min
TIL - React vs ReactDOM
Have you ever wondered why we need to import two packages to get started with React? The reason is that the library to create your user interface components and elements is separate from the implementation itself. So what does that mean?
ReactDOM deals with the implementation of React and knows where and how to mount a React element into the DOM. Some of the API you can use are:
- and the mystic
The decoupling happened with the release of React 0.14 to make life easier for developers who want to use a different implementation of React in their project.
For now, remember to run the same versions of React and ReacDOM in your project to avoid any errors.