-
-
Notifications
You must be signed in to change notification settings - Fork 369
Closed
Labels
component: dialogChanges related to the dialog component.Changes related to the dialog component.type: bugIt doesn't behave as expected.It doesn't behave as expected.
Description
Bug report
Current behavior
When a component within Dialog.Portal triggers a Suspense boundary outside of it, the component seems to be crashing with the following.
Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.
<Suspense fallback="Loading...">
<Dialog.Root open={true}>
<Dialog.Portal>
<Dialog.Popup>
{/* Triggers Suspense */}
<Message />
</Dialog.Popup>
</Dialog.Portal>
</Dialog.Root>
</Suspense>
Expected behavior
No error is thrown.
Reproducible example
https://codesandbox.io/p/sandbox/base-ui-dialog-suspense-m7h2l3
Base UI version
1.0.0
Which browser are you using?
Chrome
Which OS are you using?
Mac OS
Additional context
- If the Suspense boundary itself is inside the Portal, the error is not present.
- This scenario is working in Radix
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
component: dialogChanges related to the dialog component.Changes related to the dialog component.type: bugIt doesn't behave as expected.It doesn't behave as expected.