Skip to content

Commit

Permalink
fix warning by adding key to XRScreenInputs, XRGazes, and XRTransient…
Browse files Browse the repository at this point in the history
…Pointers
  • Loading branch information
bbohlender committed Nov 10, 2024
1 parent 3a75921 commit f38cce1
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions packages/react/xr/src/elements.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ function XRTransientPointers() {
return null
}
return (
<xrInputSourceStateContext.Provider value={state}>
<XRSpace key={objectToKey(state)} space="target-ray-space">
<xrInputSourceStateContext.Provider value={state} key={objectToKey(state)}>
<XRSpace space="target-ray-space">
<Suspense>
{typeof ResolvedImpl === 'function' ? (
<ResolvedImpl />
Expand All @@ -152,8 +152,8 @@ function XRGazes() {
<>
{gazeStates.map((state) => {
return (
<xrInputSourceStateContext.Provider value={state}>
<XRSpace key={objectToKey(state)} space="target-ray-space">
<xrInputSourceStateContext.Provider key={objectToKey(state)} value={state}>
<XRSpace space="target-ray-space">
<Suspense>
{typeof Implementation === 'function' ? (
<Implementation />
Expand All @@ -179,8 +179,8 @@ function XRScreenInputs() {
<>
{screenInputStates.map((state) => {
return (
<xrInputSourceStateContext.Provider value={state}>
<XRSpace key={objectToKey(state)} space="target-ray-space">
<xrInputSourceStateContext.Provider key={objectToKey(state)} value={state}>
<XRSpace space="target-ray-space">
<Suspense>
{typeof Implementation === 'function' ? (
<Implementation />
Expand Down

0 comments on commit f38cce1

Please sign in to comment.