redux-devtools/packages/redux-devtools-app/demo/index.tsx
renovate[bot] e9da5fc411
fix(deps): update react (major) (#1165)
* fix(deps): update react

* Fix

* Use createRoot

* Update tests

* Format

* Fix test

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Nathan Bierema <nbierema@gmail.com>
2022-06-06 16:22:05 +00:00

24 lines
585 B
TypeScript

import React from 'react';
import { createRoot } from 'react-dom/client';
import { Root } from '../src';
const root = createRoot(document.getElementById('root')!);
root.render(<Root />);
if (module.hot) {
// https://github.com/webpack/webpack/issues/418#issuecomment-53398056
module.hot.accept((err) => {
if (err) console.error(err.message); // eslint-disable-line no-console
});
/*
module.hot.accept('./app', () => {
const NextApp = require('./app').default;
render(
<NextApp />,
document.getElementById('root')
);
});
*/
}