beginner react startup code example
Example 1: 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
Example 2: react documentation
class Board extends React.Component {
renderSquare(i) {
return <Square value={i} />; }
}