toxicfox74
RReactiflux
•Created by toxicfox74 on 8/29/2023 in #react-forum
grid animations not working/snapping because of react.
hey can anyone help me? i have a problem with my grid's (masonry-layout) built in animations not working properly because of how react redraws the screen. is this a common issue?
basically i have a grid of cards (which are child components of the grid). the cards are lists that can be collapsed.
-when i update states everything snaps to place (instead of smoothly)
-if i add a transition to the collapse of the card in CSS, the grid snaps BEFORE the actual height changes... resizing the window makes the animation perform perfectly (my guess is bc it triggers some sort of recheck of the DOM???)
live link in the readme: https://github.com/ggkfox/checklister-app just try clicking around on the card's headers and you will see.
i appreciate any help, even if we cant get it fixed. im just at a complete loss. too much for a beginner.
26 replies