From 236cc65dba44c99b939f4171c93450637d0ba5a8 Mon Sep 17 00:00:00 2001 From: Cody Bennett Date: Tue, 4 Oct 2022 07:40:45 -0500 Subject: [PATCH] fix(createPortal): use correct JSX type (#2550) --- packages/fiber/src/core/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/fiber/src/core/index.tsx b/packages/fiber/src/core/index.tsx index 32175fbe1c..c5922aa32c 100644 --- a/packages/fiber/src/core/index.tsx +++ b/packages/fiber/src/core/index.tsx @@ -406,7 +406,7 @@ export type InjectState = Partial< } > -function createPortal(children: React.ReactNode, container: THREE.Object3D, state?: InjectState): React.ReactNode { +function createPortal(children: React.ReactNode, container: THREE.Object3D, state?: InjectState): JSX.Element { return } @@ -418,7 +418,7 @@ function Portal({ children: React.ReactNode state?: InjectState container: THREE.Object3D -}) { +}): JSX.Element { /** This has to be a component because it would not be able to call useThree/useStore otherwise since * if this is our environment, then we are not in r3f's renderer but in react-dom, it would trigger * the "R3F hooks can only be used within the Canvas component!" warning: