Pitfalls

Pitfalls to avoid when building userinterfaces with uikit

Asynchronous Objects inside Content

The Content component measures its content when the component is created. If the content is loaded asynchronous, this measurement will be incorrect. To prevent this behavior, suspense boundaries must be placed correctly.

❌ incorrect✅ correct
<Content>
    <Suspense>
        <Gltf src="...">
    </Suspense>
</Content>
<Suspense>
    <Content>
        <Gltf src="...">
    </Content>
</Suspense>