KamoCRM

Dispatch member-panel-toggle via useEffect to avoid stale Framer Motion closure

Fixkamo-internal
Navios
11 de março de 2026 às 20:04 UTC
Autor
kamo
Enviar
8b1561e

onAnimationStart/Complete hold the last rendered props, so the exit animation always saw isOpen=true and windows never relayed to the right on close. Using a useEffect on isOpen fires immediately when the prop changes, so tool windows start moving as soon as the panel begins animating away.

Todas as alterações

Como o que vês no transporte?

Tudo isso chega em seu espaço de trabalho por conta própria. Comece no plano gratuito e leia esta página novamente em um mês.

Começar Livre Para SempreVer Preços