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
import*asReactfrom"react";import{createRoot}from"react-dom/client";import{AnimatePresence,motion}from"framer-motion";constrootElement=document.getElementById("root");constroot=createRoot(rootElement);constanimation={x: 0,// Comment this out and it works.opacity: 0.5};exportconstScreen=functionComponent(){const[visible,setVisible]=React.useState(false);return(<><motion.divclassName={"button"}onTap={()=>setVisible(!visible)}style={{width: 100,height: 100,background: "green"}}/><AnimatePresence>{visible &&(<motion.divlayoutId={"An2J7Niah"}// Comment this out and it works.style={{width: 100,height: 100,background: "blue"}}className={"BLUE"}exit={animation}/>)}</AnimatePresence></>);};root.render(<Screen/>);
With the above code (code sandbox: https://codesandbox.io/s/aged-leaf-1tlyr2?file=/src/index.tsx ), click the green square, will show a blue square, click it again, it should disappear after an exit animation. But instead it will never go away.
This is a regression in 10.12.8. And one way to fix it is to change create-projection-node.ts use of the queueMicrotask, like this:
With the above code (code sandbox: https://codesandbox.io/s/aged-leaf-1tlyr2?file=/src/index.tsx ), click the green square, will show a blue square, click it again, it should disappear after an exit animation. But instead it will never go away.
This is a regression in 10.12.8. And one way to fix it is to change
create-projection-node.ts
use of thequeueMicrotask
, like this:The text was updated successfully, but these errors were encountered: