Get your own React server
import React from 'react';
import ReactDOM from 'react-dom/client';

function shoot() {
  alert("Great Shot!");
}

const myelement = (
  <button onClick={shoot}>Take the shot!</button>
);

const container = document.getElementById('root');
const root = ReactDOM.createRoot(container);
root.render(myelement);

              
localhost:3000