Skip to content

Commit b3d60aa

Browse files
authored
Merge pull request #379 from mkeblx/patch-1
Update Guards doc page
2 parents acc7d7f + 05f5d7f commit b3d60aa

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/tutorials/guards.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Guards allow to conditionally display or include content. For instance, the `IfI
88

99
```tsx
1010
import { Canvas } from '@react-three/fiber'
11-
import { XR, createXRStore } from '@react-three/xr'
11+
import { IfInSessionMode, XR, createXRStore } from '@react-three/xr'
1212

1313
const store = createXRStore()
1414

@@ -18,9 +18,9 @@ export function App() {
1818
<button onClick={() => store.enterAR()}>Enter AR</button>
1919
<Canvas>
2020
<XR store={store}>
21-
<SessionModeGuard deny="immersive-ar">
21+
<IfInSessionMode deny="immersive-ar">
2222
<color args={['red']} attach="background" />
23-
</SessionModeGuard>
23+
</IfInSessionMode>
2424
</XR>
2525
</Canvas>
2626
</>

0 commit comments

Comments
 (0)