Skip to content
This repository has been archived by the owner on Jan 24, 2024. It is now read-only.

Commit

Permalink
modify: update for react v18
Browse files Browse the repository at this point in the history
  • Loading branch information
sota1235 committed Dec 3, 2022
1 parent 2684a45 commit cff2007
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 14 deletions.
16 changes: 8 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
"@stylelint/postcss-css-in-js": "^0.38.0",
"@types/jest": "^28.0.0",
"@types/node": "18.11.10",
"@types/react": "17.0.52",
"@types/react-dom": "18.0.9",
"@types/react": "^18.0.26",
"@types/react-dom": "^18.0.9",
"@types/react-redux": "7.1.24",
"@types/styled-components": "5.1.26",
"babel-core": "^7.0.0-bridge.0",
Expand Down
7 changes: 4 additions & 3 deletions src/components/Nav/Nav.test.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import * as ReactDOM from 'react-dom';
import { Nav } from '.';
import { createRoot } from 'react-dom/client';

it('should render without crashing', () => {
const div = document.createElement('div');
ReactDOM.render(<Nav />, div);
ReactDOM.unmountComponentAtNode(div);
const root = createRoot(div);
root.render(<Nav />);
root.unmount();
});
6 changes: 5 additions & 1 deletion src/styles/AppStylesProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@ import { ThemeProvider } from 'styled-components';
import { theme } from './theme';
import { GlobalStyle } from './GlobalStyle';

const AppStylesProvider: React.FC = ({ children }) => (
type Props = {
children: React.ReactNode;
}

const AppStylesProvider: React.FC<Props> = ({ children }) => (
<ThemeProvider theme={theme}>
<GlobalStyle />
{children}
Expand Down

0 comments on commit cff2007

Please sign in to comment.