You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
"Cannot update a component while rendering a different component" while using controlled expanded state #6450
Using the official Expanding example and switching to controlled expanded state, I am receiving an error saying: Cannot update a component (App) while rendering a different component (App).
To switch to the controlled state, these steps were made:
const [expanded, setExpanded] = useState<ExpandedState>({}) added to the App.
Do you intend to try to help solve this bug with your own PR?
No, because I do not know how
Terms & Code of Conduct
I agree to follow this project's Code of Conduct
I understand that if my bug cannot be reliable reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.
Activity
volodymyrdn commentedon Jul 21, 2026
UPDATE: this error occurs in all examples, where the controlled state is used. For example this and that.
KevinVandy commentedon Jul 31, 2026
we think we finally fixed this in the latest v9 beta