add react

This commit is contained in:
João Geonizeli
2022-07-21 16:38:44 -03:00
parent 9dd9e28bf7
commit 54e2db46f1
5 changed files with 87 additions and 4 deletions

View File

@@ -1 +0,0 @@
console.log('Hello, Typescript!')

View File

@@ -0,0 +1,14 @@
import React from 'react';
import { createRoot } from 'react-dom/client';
const container = document.getElementById('app');
const App = () => {
return (<div>Hello, Rails 7!</div>)
}
if (container) {
const root = createRoot(container); // createRoot(container!) if you use TypeScript
root.render(<App />);
}