Skip to content

Commit

Permalink
update from render to createRoot and font import statement
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelma7 committed May 15, 2024
1 parent af629b5 commit 7b7c64d
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions frontend/index.tsx
Original file line number Diff line number Diff line change
@@ -1,22 +1,17 @@
import React from 'react';
import { render } from 'react-dom';
// import { createRoot } from 'react-dom/client';
// import { render } from 'react-dom';
import { createRoot } from 'react-dom/client';

import App from './components/App';
// import 'codemirror/lib/codemirror.css';

import 'fontsource-roboto';
import '@fontsource/roboto';

const root = document.createElement('div');
const root = createRoot(document.createElement('div'));
root.id = 'root';
document.body.appendChild(root);

render(
<div>
<App />
</div>,
document.getElementById('root'),
);
root.render(<App />);

// const container = document.getElementById('root') as HTMLElement;
// const root = createRoot(container);
Expand Down

0 comments on commit 7b7c64d

Please sign in to comment.