Skip to content
\n

My App.js:

\n
import { Suspense } from 'react';\nimport { Canvas } from '@react-three/fiber/native';\nimport { useGLTF } from '@react-three/drei/native';\nimport { StatusBar } from 'expo-status-bar';\nimport { StyleSheet, Text, View } from 'react-native';\n\nexport default function App() {\n  return (\n    <View>\n      <Text>Hello, world!</Text>\n      <Canvas>\n        <ambientLight />\n        <mesh>\n          <boxGeometry />\n          <meshStandardMaterial />\n        </mesh>\n      </Canvas>\n    </View>\n  );\n}
\n

This renders a blank screen. Doesn't matter if I remove <View> and/or <Text>, no scene renders, just a white screen:

\n\"Screen\n

This is after following the instructions on https://docs.pmnd.rs/react-three-fiber/getting-started/installation#react-native

\n

I also get one of the same warnings (shown in the screenshot) as #2823

","upvoteCount":2,"answerCount":2,"acceptedAnswer":{"@type":"Answer","text":"

Have you tested on device? Unfortunately OpenGL doesn't render on XCode emulator with expo-gl.

","upvoteCount":1,"url":"https://github.com/pmndrs/react-three-fiber/discussions/3064#discussioncomment-7372876"}}}

Blank/white screen with react-three-fiber, iOS, and React Native #3064

Discussion options

You must be logged in to vote

Have you tested on device? Unfortunately OpenGL doesn't render on XCode emulator with expo-gl.

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by AndrewRayCode
Comment options

You must be logged in to vote
2 replies
@satyajitghana
Comment options

@nstafford
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants