Skip to content

Commit

Permalink
Merge pull request #71 from apollographql/update-react
Browse files Browse the repository at this point in the history
update react, create root
  • Loading branch information
lizhennessy authored Feb 23, 2024
2 parents 87e9f9c + 863f95e commit c6f00b8
Show file tree
Hide file tree
Showing 8 changed files with 4,779 additions and 6,066 deletions.
3,850 changes: 2,152 additions & 1,698 deletions client/package-lock.json

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
"@emotion/react": "^11.4.0",
"@emotion/styled": "^11.3.0",
"graphql": "^15.3.0",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"react-markdown": "^6.0.2",
"react-player": "^2.6.0",
"react-router-dom": "^6.8.0"
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-markdown": "^9.0.1",
"react-player": "^2.14.1",
"react-router-dom": "^6.22.0"
},
"scripts": {
"test": "vitest",
Expand Down
9 changes: 5 additions & 4 deletions client/src/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import ReactDOM from 'react-dom';
import { createRoot } from 'react-dom/client'
import GlobalStyles from './styles';
import Pages from './pages';
import { ApolloProvider, ApolloClient, InMemoryCache } from '@apollo/client';
Expand All @@ -9,10 +9,11 @@ const client = new ApolloClient({
cache: new InMemoryCache(),
});

ReactDOM.render(
const root = createRoot(document.getElementById('root'));

root.render(
<ApolloProvider client={client}>
<GlobalStyles />
<Pages />
</ApolloProvider>,
document.getElementById('root')
</ApolloProvider>
);
3,551 changes: 2,069 additions & 1,482 deletions final/client/package-lock.json

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions final/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
"@emotion/react": "^11.4.0",
"@emotion/styled": "^11.3.0",
"graphql": "^15.3.0",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"react-markdown": "^6.0.2",
"react-player": "^2.6.0",
"react-router-dom": "^6.8.0"
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-markdown": "^9.0.1",
"react-player": "^2.14.1",
"react-router-dom": "^6.22.0"
},
"scripts": {
"test": "vitest",
Expand Down
9 changes: 5 additions & 4 deletions final/client/src/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import ReactDOM from 'react-dom';
import { createRoot } from 'react-dom/client'
import GlobalStyles from './styles';
import Pages from './pages';
import { ApolloProvider, ApolloClient, InMemoryCache } from '@apollo/client';
Expand All @@ -9,10 +9,11 @@ const client = new ApolloClient({
cache: new InMemoryCache(),
});

ReactDOM.render(
const root = createRoot(document.getElementById('root'));

root.render(
<ApolloProvider client={client}>
<GlobalStyles />
<Pages />
</ApolloProvider>,
document.getElementById('root')
</ApolloProvider>
);
1,721 changes: 275 additions & 1,446 deletions final/server/package-lock.json

Large diffs are not rendered by default.

Loading

0 comments on commit c6f00b8

Please sign in to comment.