how do react work code example
Example: how react work
React creates a VIRTUAL DOM in memory.
Instead of manipulating the browser's DOM directly,
React creates a virtual DOM in memory,
where it does all the necessary manipulating,
before making the changes in the browser DOM.
then changes only what needs to be changed