Skip to content

Commit

Permalink
Merge branch 'master' into v9
Browse files Browse the repository at this point in the history
  • Loading branch information
CodyJasonBennett committed Oct 11, 2022
2 parents e80b43c + accff84 commit 968891b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions packages/fiber/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @react-three/fiber

## 8.8.9

### Patch Changes

- 4254400e: fix(createPortal): use correct JSX type

## 8.8.8

### Patch Changes
Expand Down
4 changes: 2 additions & 2 deletions packages/fiber/src/core/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,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 <Portal key={container.uuid} children={children} container={container} state={state} />
}

Expand All @@ -449,7 +449,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:
Expand Down

0 comments on commit 968891b

Please sign in to comment.