ReactDOM.render(<Person />, document.querySelector('#p1'));
ReactDOM.render(<Person name="Max" age=28 />, ...)
.render()
function by creating a single "app" div, and then having an "app" variable in his JavaScript code that contains the JSX code.ReactDOM.render()
call. In a multi-page approach you would make one call for each isolated React widget.