Skip to content

Commit bde36bc

Browse files
chore(deps): Bump react-dom and @types/react-dom (#1223)
* chore(deps): Bump react-dom and @types/react-dom Bumps [react-dom](https://github.com/facebook/react/tree/HEAD/packages/react-dom) and [@types/react-dom](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react-dom). These dependencies needed to be updated together. Updates `react-dom` from 17.0.2 to 19.0.0 - [Release notes](https://github.com/facebook/react/releases) - [Changelog](https://github.com/facebook/react/blob/main/CHANGELOG.md) - [Commits](https://github.com/facebook/react/commits/v19.0.0/packages/react-dom) Updates `@types/react-dom` from 17.0.16 to 19.0.2 - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react-dom) --- updated-dependencies: - dependency-name: react-dom dependency-type: direct:production update-type: version-update:semver-major - dependency-name: "@types/react-dom" dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * chore: update react in sync with react-dom * chore: update to latest ReactDOM client syntax --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Steve <srherzog@gmail.com>
1 parent 5a12458 commit bde36bc

File tree

28 files changed

+384
-188
lines changed

28 files changed

+384
-188
lines changed

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1313,12 +1313,14 @@ function MyComponent() {
13131313
import { useQuery } from 'graphql-hooks'
13141314
import { graphql } from './gql'
13151315

1316-
const HOMEPAGE_QUERY = graphql(`query HomePage($limit: Int) {
1317-
users(limit: $limit) {
1318-
id
1319-
name
1316+
const HOMEPAGE_QUERY = graphql(`
1317+
query HomePage($limit: Int) {
1318+
users(limit: $limit) {
1319+
id
1320+
name
1321+
}
13201322
}
1321-
}`)
1323+
`)
13221324

13231325
function MyComponent() {
13241326
// data will be typed as User objects with id, name properties
@@ -1343,7 +1345,6 @@ function MyComponent() {
13431345

13441346
Full details of the features of `TypedDocumentNode` and GraphQL Code Generator can be found [here](https://the-guild.dev/graphql/codegen). Full examples of this implementation are in the examples folder.
13451347

1346-
13471348
## Other
13481349

13491350
### Request interceptors
@@ -1409,7 +1410,6 @@ function AbortControllerExample() {
14091410
14101411
As well as supporting input of your queries as strings, this library also supports using a `DocumentNode`. Document nodes can be generated using a code-generation tool such as [GraphQL codegen](https://the-guild.dev/graphql/codegen) which will provide typing information for your queries based on your GraphQL schema (see the typescript example). If you don't want to use a code-generation library you can use `graphql-tag` to generate a `DocumentNode`.
14111412
1412-
14131413
```js
14141414
import gql from 'graphql-tag'
14151415

@@ -1499,4 +1499,4 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
14991499
15001500
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind are welcome!
15011501
1502-
[![banner](https://raw.githubusercontent.com/nearform/.github/refs/heads/master/assets/os-banner-green.svg)](https://www.nearform.com/contact/?utm_source=open-source&utm_medium=banner&utm_campaign=os-project-pages)
1502+
[![banner](https://raw.githubusercontent.com/nearform/.github/refs/heads/master/assets/os-banner-green.svg)](https://www.nearform.com/contact/?utm_source=open-source&utm_medium=banner&utm_campaign=os-project-pages)

examples/create-react-app/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
"graphql-hooks-memcache": "^3.2.0",
1111
"json-graphql-server": "^3.0.1",
1212
"prop-types": "^15.7.2",
13-
"react": "^18.0.0",
13+
"react": "^19.0.0",
1414
"react-app-polyfill": "^2.0.0",
15-
"react-dom": "^18.0.0",
15+
"react-dom": "^19.0.0",
1616
"react-scripts": "^5.0.0"
1717
},
1818
"scripts": {
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import 'react-app-polyfill/ie11'
22
import React from 'react'
3-
import ReactDOM from 'react-dom'
3+
import ReactDOM from 'react-dom/client'
44

55
import App from './App'
66
import './index.css'
77

8-
ReactDOM.render(<App />, document.getElementById('root'))
8+
const root = ReactDOM.createRoot(document.getElementById('root'))
9+
root.render(<App />)

examples/fastify-ssr/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@
3333
"isomorphic-unfetch": "^4.0.2",
3434
"mercurius": "^14.0.0",
3535
"prop-types": "^15.7.2",
36-
"react": "^18.0.0",
37-
"react-dom": "^18.0.0",
36+
"react": "^19.0.0",
37+
"react-dom": "^19.0.0",
3838
"react-router-dom": "^6.0.2"
3939
},
4040
"devDependencies": {

examples/fastify-ssr/src/client/js/app-shell.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { ClientContext, GraphQLClient } from 'graphql-hooks'
22
import memCache from 'graphql-hooks-memcache'
33
import React from 'react'
4-
import { hydrate } from 'react-dom'
4+
import { createRoot } from 'react-dom/client'
55
import { BrowserRouter } from 'react-router-dom'
66
import AppShell from '../../app/AppShell.js'
77

@@ -19,4 +19,5 @@ const App = (
1919
</BrowserRouter>
2020
)
2121

22-
hydrate(App, document.getElementById('app-root'))
22+
const root = createRoot(document.getElementById('app-root'))
23+
root.hydrate(App)

examples/full-ws-transport/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
"graphql-hooks": "^8.2.0",
88
"graphql-ws": "^5.5.5",
99
"mercurius": "^14.0.0",
10-
"react": "^18.0.0",
11-
"react-dom": "^18.0.0",
10+
"react": "^19.0.0",
11+
"react-dom": "^19.0.0",
1212
"react-scripts": "^5.0.0"
1313
},
1414
"scripts": {

examples/full-ws-transport/src/index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from 'react'
2-
import ReactDOM from 'react-dom'
2+
import ReactDOM from 'react-dom/client'
33
import { createClient } from 'graphql-ws'
44
import { GraphQLClient, ClientContext } from 'graphql-hooks'
55
import App from './App'
@@ -16,11 +16,11 @@ const client = new GraphQLClient({
1616
subscriptionClient
1717
})
1818

19-
ReactDOM.render(
19+
const root = ReactDOM.createRoot(document.getElementById('root'))
20+
root.render(
2021
<React.StrictMode>
2122
<ClientContext.Provider value={client}>
2223
<App />
2324
</ClientContext.Provider>
24-
</React.StrictMode>,
25-
document.getElementById('root')
25+
</React.StrictMode>
2626
)

examples/persisted-queries/client/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
"dependencies": {
66
"@types/jest": "^29.0.3",
77
"@types/node": "^22.10.5",
8-
"@types/react": "^18.0.0",
9-
"@types/react-dom": "^18.0.0",
8+
"@types/react": "^19.0.3",
9+
"@types/react-dom": "^19.2.0",
1010
"graphql-hooks": "^8.2.0",
1111
"graphql-hooks-memcache": "^3.2.0",
12-
"react": "^18.0.0",
13-
"react-dom": "^18.0.0",
12+
"react": "^19.0.0",
13+
"react-dom": "^19.0.0",
1414
"react-scripts": "^5.0.0",
1515
"typescript": "^4.1.2"
1616
},
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import React from 'react'
2-
import ReactDOM from 'react-dom'
2+
import ReactDOM from 'react-dom/client'
33
import './index.css'
44
import App from './App'
55

6-
ReactDOM.render(<App />, document.getElementById('root'))
6+
const root = ReactDOM.createRoot(document.getElementById('root') as HTMLElement)
7+
root.render(<App />)

examples/subscription/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
"lowdb": "^7.0.1",
2626
"mercurius": "^14.0.0",
2727
"mqemitter-redis": "^5.0.0",
28-
"react": "^18.0.0",
29-
"react-dom": "^18.0.0",
28+
"react": "^19.0.0",
29+
"react-dom": "^19.0.0",
3030
"subscriptions-transport-ws": "^0.11.0"
3131
},
3232
"devDependencies": {

0 commit comments

Comments
 (0)