Skip to content

Commit e8bfdf9

Browse files
committed
Updated 60th answer
1 parent a7c425e commit e8bfdf9

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

README.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1361,7 +1361,7 @@ Curated top React.js interview questions with high quality answers for acing you
13611361
<br>
13621362
<br>
13631363
1364-
60. ### How to conditionally apply class attributes?
1364+
59. ### How to conditionally apply class attributes?
13651365
13661366
You shouldn't use curly braces inside quotes because it is going to be evaluated as a string.
13671367
@@ -1389,5 +1389,19 @@ Curated top React.js interview questions with high quality answers for acing you
13891389
<br>
13901390
<br>
13911391
1392+
60. ### Why ReactDOM is separated from React?
1393+
1394+
The React team worked on extracting all DOM-related features into a separate library called _ReactDOM_. React v0.14 is the first release in which the libraries are split. By looking at some of the packages, `react-native`, `react-art`, `react-canvas`, and `react-three`, it has become clear that the beauty and essence of React has nothing to do with browsers or the DOM.
1395+
1396+
To build more environments that React can render to, React team planned to split the main React package into two: `react` and `react-dom`. This paves the way to writing components that can be shared between the web version of React and React Native.
1397+
1398+
<br>
1399+
1400+
> Read the [detailed answer](https://www.greatfrontend.com/questions/quiz/why-react-dom-is-separated-from-react?framework=react&tab=quiz) on [GreatFrontEnd](https://www.greatfrontend.com?gnrs=github) which allows progress tracking, contains more code samples, and useful resources.
1401+
1402+
[Back to top ↑](#table-of-contents)
1403+
<br>
1404+
<br>
1405+
13921406
13931407
<!-- QUESTIONS:END -->

0 commit comments

Comments
 (0)