From 080e6e22850e579718053a11b741be6f968a02ed Mon Sep 17 00:00:00 2001 From: Cody Bennett <23324155+CodyJasonBennett@users.noreply.github.com> Date: Tue, 4 Oct 2022 07:20:48 -0500 Subject: [PATCH] fix(createPortal): use correct JSX type --- 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: