curiousroamers/src/client/main.tsx

14 lines
317 B
TypeScript

import React from 'react';
import {render, hydrate} from 'react-dom';
import Root from './Root';
const root = document.getElementById('root');
let renderMethod;
if (root && root.innerHTML !== '') {
renderMethod = hydrate;
} else {
renderMethod = render;
}
renderMethod(<Root />, document.getElementById('root'));