Skip to content

Commit

Permalink
Merge pull request #379 from mkeblx/patch-1
Browse files Browse the repository at this point in the history
Update Guards doc page
  • Loading branch information
bbohlender authored Dec 6, 2024
2 parents acc7d7f + 05f5d7f commit b3d60aa
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/tutorials/guards.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Guards allow to conditionally display or include content. For instance, the `IfI

```tsx
import { Canvas } from '@react-three/fiber'
import { XR, createXRStore } from '@react-three/xr'
import { IfInSessionMode, XR, createXRStore } from '@react-three/xr'

const store = createXRStore()

Expand All @@ -18,9 +18,9 @@ export function App() {
<button onClick={() => store.enterAR()}>Enter AR</button>
<Canvas>
<XR store={store}>
<SessionModeGuard deny="immersive-ar">
<IfInSessionMode deny="immersive-ar">
<color args={['red']} attach="background" />
</SessionModeGuard>
</IfInSessionMode>
</XR>
</Canvas>
</>
Expand Down

0 comments on commit b3d60aa

Please sign in to comment.