From 85ac2534a59abd38880011e77da4bb8c716eba84 Mon Sep 17 00:00:00 2001 From: "Sebastian \"Sebbie\" Silbermann" Date: Thu, 5 Dec 2024 20:59:45 +0100 Subject: [PATCH] feat: Add support for React 19 (#1367) --- package.json | 12 ++++++------ types/test.tsx | 6 +++++- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 8bfbeecc..711140d1 100644 --- a/package.json +++ b/package.json @@ -50,8 +50,8 @@ "devDependencies": { "@testing-library/dom": "^10.0.0", "@testing-library/jest-dom": "^5.11.6", - "@types/react": "^18.3.1", - "@types/react-dom": "^18.3.0", + "@types/react": "^19.0.0", + "@types/react-dom": "^19.0.0", "chalk": "^4.1.2", "dotenv-cli": "^4.0.0", "jest-diff": "^29.7.0", @@ -64,10 +64,10 @@ }, "peerDependencies": { "@testing-library/dom": "^10.0.0", - "@types/react": "^18.0.0", - "@types/react-dom": "^18.0.0", - "react": "^18.0.0", - "react-dom": "^18.0.0" + "@types/react": "^18.0.0 || ^19.0.0", + "@types/react-dom": "^18.0.0 || ^19.0.0", + "react": "^18.0.0 || ^19.0.0", + "react-dom": "^18.0.0 || ^19.0.0" }, "peerDependenciesMeta": { "@types/react": { diff --git a/types/test.tsx b/types/test.tsx index 2b3dd7ca..67832b23 100644 --- a/types/test.tsx +++ b/types/test.tsx @@ -128,7 +128,11 @@ export function wrappedRender( ui: React.ReactNode, options?: pure.RenderOptions, ) { - const Wrapper = ({children}: {children: React.ReactNode}): JSX.Element => { + const Wrapper = ({ + children, + }: { + children: React.ReactNode + }): React.JSX.Element => { return
{children}
}