Skip to content

Commit f38cce1

Browse files
committed
fix warning by adding key to XRScreenInputs, XRGazes, and XRTransientPointers
1 parent 3a75921 commit f38cce1

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

packages/react/xr/src/elements.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,8 @@ function XRTransientPointers() {
125125
return null
126126
}
127127
return (
128-
<xrInputSourceStateContext.Provider value={state}>
129-
<XRSpace key={objectToKey(state)} space="target-ray-space">
128+
<xrInputSourceStateContext.Provider value={state} key={objectToKey(state)}>
129+
<XRSpace space="target-ray-space">
130130
<Suspense>
131131
{typeof ResolvedImpl === 'function' ? (
132132
<ResolvedImpl />
@@ -152,8 +152,8 @@ function XRGazes() {
152152
<>
153153
{gazeStates.map((state) => {
154154
return (
155-
<xrInputSourceStateContext.Provider value={state}>
156-
<XRSpace key={objectToKey(state)} space="target-ray-space">
155+
<xrInputSourceStateContext.Provider key={objectToKey(state)} value={state}>
156+
<XRSpace space="target-ray-space">
157157
<Suspense>
158158
{typeof Implementation === 'function' ? (
159159
<Implementation />
@@ -179,8 +179,8 @@ function XRScreenInputs() {
179179
<>
180180
{screenInputStates.map((state) => {
181181
return (
182-
<xrInputSourceStateContext.Provider value={state}>
183-
<XRSpace key={objectToKey(state)} space="target-ray-space">
182+
<xrInputSourceStateContext.Provider key={objectToKey(state)} value={state}>
183+
<XRSpace space="target-ray-space">
184184
<Suspense>
185185
{typeof Implementation === 'function' ? (
186186
<Implementation />

0 commit comments

Comments
 (0)