<div id="root"></div>
body {
  height: 100vh;
  margin: 0;
  display: grid;
  place-items: center;
}
.box {
  width: 300px;
  h1 {
    font-size: 20px;
    margin: 0 0 1rem 0;
  }
}
View Compiled
import React, { useState } from "https://cdn.skypack.dev/[email protected]";
import ReactDOM from "https://cdn.skypack.dev/[email protected]";

const App = () => {
  const [count, setCount] = useState(10);
  const [name, setName] = useState('');
  
  const addOne = () => {
    setCount((prevValue) => prevValue + 1);
    setCount((prevValue) => prevValue + 1);
  };
  
  return(
    <div className="box">
      <p>The count is {count}</p>
      <button onClick={addOne}>Add one</button>
      <hr />
      <p>Your name is {name}</p>
      <button onClick={() => setName('Chris')}>Set name</button>
    </div>
  );
}

ReactDOM.render(<App />,
document.getElementById("root"))
View Compiled

External CSS

  1. https://cdnjs.cloudflare.com/ajax/libs/bulma/0.7.4/css/bulma.min.css

External JavaScript

  1. https://unpkg.com/[email protected]/umd/react.production.min.js
  2. https://unpkg.com/[email protected]/umd/react-dom.production.min.js