react-three-fiber
react-three-fiber copied to clipboard
Error in test renderer when calling update
https://codesandbox.io/s/gracious-blackwell-yuleq6?file=/app.test.js
Using the box from the examples
import ReactThreeTestRenderer from '@react-three/test-renderer'
import { Box } from './src/App'
it('Test', async () => {
const threeRenderer = await ReactThreeTestRenderer.create(<Box />)
await threeRenderer.update(<Box />)
})
Tested in version 7 and 8. When using update it seems that it can't find the context provider. Weirdly the initial create works fine
'R3F hooks can only be used within the Canvas component!'