Skip to content

Commit

Permalink
add: set all props on mount... even in StrictMode on 2nd render. fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
brianzinn committed Aug 27, 2023
1 parent 1e7c554 commit 6247f3d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/react-babylonjs/src/Scene.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ const Scene: React.FC<SceneProps> = (props: SceneProps, context?: any) => {
},
}

// NOTE: in StrictMode will contain props from first render
prevPropsRef.current = {}
updateScene(props, prevPropsRef, container.rootInstance, propsHandler)

const reconciler = createReconciler({})
Expand Down

0 comments on commit 6247f3d

Please sign in to comment.