W3Schools Tryit Editor

[フレーム]
Get your own React server
main.jsx
index.html
Button.module.css
import { createRoot } from 'react-dom/client';
import styles from './Button.module.css';
function App() {
 return (
 <div>
 <button className={styles.mybutton}>
 My Button
 </button>
 </div>
 );
}
createRoot(document.getElementById('root')).render(
 <App />
);
 
<!doctype html>
<html lang="en">
 <body>
 <div id="root"></div>
 <script type="module" src="/src/main.jsx"></script>
 </body>
</html>
 
.mybutton {
 padding: 10px 20px;
 border: none;
 border-radius: 4px;
 cursor: pointer;
}
 
localhost:5173

AltStyle によって変換されたページ (->オリジナル) /