Skip to content

Commit ae1afc0

Browse files
author
Sebastian Silbermann
committed
Bring back support for React 18
1 parent 9e785f6 commit ae1afc0

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@
6262
"typescript": "^4.1.2"
6363
},
6464
"peerDependencies": {
65-
"react": "^18.3.0-canary",
66-
"react-dom": "^18.3.0-canary"
65+
"react": "^18.0.0 || ^18.3.0-canary",
66+
"react-dom": "^18.0.0 || ^18.3.0-canary"
6767
},
6868
"eslintConfig": {
6969
"extends": "./node_modules/kcd-scripts/eslint.js",

src/act-compat.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import * as React from 'react'
2+
import * as DeprecatedReactTestUtils from 'react-dom/test-utils'
23

3-
const reactAct = React.act
4+
const reactAct = React.act ?? DeprecatedReactTestUtils.act
45

56
function getGlobalThis() {
67
/* istanbul ignore else */

0 commit comments

Comments
 (0)