Preview:
// rendering html using React. createElement
ReactDOM.render(
  React.createElement("h1", null,"Getting Started with React!!!"),
  document.getElementById("root")
)

// using a variable instead of directly putting  on render
let heading = React.createElement("h1", null,"Getting Started with React!!!")
ReactDOM.render(
  heading,
  document.getElementById("root")
)

// using JSX make sure to compile using Babel
ReactDOM.render(
        <ul>
          <li>🤖</li>
          <li>🤠</li>
          <li>🌝</li>
        </ul>,
        document.getElementById("root")
      );
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter