Keep the body in the DOM when collapsed (hidden via CSS) instead of unmounting it. Use for a
stateful widget whose content shouldn't be rebuilt on every collapse — e.g. the sidebar chat,
whose live conversation, draft input, and DOM-attached listeners would otherwise be torn down
and (because its hooks live in the always-mounted parent) not re-wired on expand.
Keep the body in the DOM when collapsed (hidden via CSS) instead of unmounting it. Use for a stateful widget whose content shouldn't be rebuilt on every collapse — e.g. the sidebar chat, whose live conversation, draft input, and DOM-attached listeners would otherwise be torn down and (because its hooks live in the always-mounted parent) not re-wired on expand.