vueuse / motion

🤹 Vue Composables putting your components in motion
https://motion.vueuse.org
MIT License
2.37k stars 82 forks source link

motion component applied expired styles after component updated #202

Closed ZhouY11 closed 4 months ago

ZhouY11 commented 5 months ago

System info

System(Stackblitz Website Config): OS: Linux 5.0 undefined CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz Memory: 0 Bytes / 0 Bytes Shell: 1.0 - /bin/jsh Binaries: Node: 18.20.3 - /usr/local/bin/node Yarn: 1.22.19 - /usr/local/bin/yarn npm: 10.2.3 - /usr/local/bin/npm pnpm: 8.15.6 - /usr/local/bin/pnpm NpmPackages: @vueuse/core: ^7.6.2 => 7.6.2 @vueuse/motion: ^2.2.3 => 2.2.3 vite: ^5.3.1 => 5.3.1 vue: ^3.2.25 => 3.2.31

Reproduction

Please open Stackblitz code

Describe the bug

Vue reapplies all styles every render, include style properties and calculated initially styles get reapplied every render. It caused the component to apply the wrong style after triggering the update.

屏幕截图 2024-06-18 152142 屏幕截图 2024-06-18 152551

Additional context

No response

Logs

No response

BobbieGoede commented 4 months ago

Resolved by #202