0
JavaScript is a scripting language used to manipulate DOM elements using the DOM API, such as adding event listeners to buttons or any other document node to act in specific ways when clicked, hovered over, etc. React on the other hand is a View Library developed by Facebook to make you write shorter scripts than you would do with JavaScript. React uses a Virtual DOM which is a lightweight representation of the DOM in memory. The Virtual DOM is composed of Components which can be represented as classes or functions in React. If you look at a HTML file you will notice that all the nodes may or may not be depending on each other (there are parent nodes and children nodes). A component can be for example an entire Form which contains other components like Button, Input field, etc. These components can be reused later on, which means lesser code to write. If you change the state of a Component, React reacts to the state change and updates the DOM
5th Apr 2020, 10:17 PM
Sebastian Pacurar
Sebastian Pacurar - avatar
0
You can find more information about how react works and its pros and cons here: https://reactjs.org/
5th Apr 2020, 10:20 PM
Sebastian Pacurar
Sebastian Pacurar - avatar