Skip to content

I get error while using drei Text element #865

Answered by mwmwmw
Achi00 asked this question in Q&A
Discussion options

You must be logged in to vote

You will get this error if you attempt to use R3F components outside of the <Canvas /> or inside an <Html /> component

Check to make sure your components are in the right place.

// ✅ good
<Canvas>
<primitive object={myObj} />
</Canvas>

// ❌bad
<Canvas>
 /* etc ... */
</Canvas>
<primitive object={myObj} />

// ❌bad
<Canvas>
  <Html>
    <primitive />
  </Html>
</Canvas>

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Achi00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants