Apply CSS transitions when adding or removing Preact components/elements
by developitLast 12 weeks · 0 commits
1 of 6 standards met
On poor performances devices, we've experienced some lag when the animation starts. This was mainly due to the queuing the final . Switching to performs better than the (delayed as a macrotask). was actually the original implementation A is also raised when timeouts are not specified in the js api. Unit test have been fixed and updated consequent to these changes
Repository: developit/preact-css-transition-group. Description: Apply CSS transitions when adding or removing Preact components/elements Stars: 61, Forks: 17. Primary language: JavaScript. Languages: JavaScript (98.8%), CSS (1.2%). Topics: css-transitions, preact. Latest release: 1.3.0 (8y ago). Open PRs: 4, open issues: 8. Last activity: 7y ago. Community health: 28%. Top contributors: developit, myarcane, zemlanin, dharFr, philipwalton.
JavaScript
When operating on a list of size one, preserve the render order of children. On single element children, the render order appears to be incorrectly swapped when adding and removing another child. I don't claim to fully understand all the intricacies of this library but I've tried to add some tests to make the change a little more confident.
Hi, I'm having some problems with this library. After the first transition, the the new child entering the transition group already has the and classes already set, which breaks the animations. If I patch Preact to disable component recycling (e.g. by making a no-op), the issue disappears. Am I doing using something wrong here, or is this a real issue? Test case: https://codesandbox.io/s/72mq76qow6 (click Next Page twice to trigger the issue)