Unable to get useAnimateGroup hook or AnimateGroup to apply the initial start styles.
See original GitHub issueFirstly let me say this is a great little css animation component. Thank you. I have been looking for awhile for something small that is simple to use, and this is exactly what I was looking for. Unfortunately I couldn’t get it to work properly.
Describe the bug
In the example provided for useAnimateGroup in https://react-simple-animate.now.sh/hooks, it starts with { opacity: 1, transform: "translateY(0)" }
. If you check the DOM, these styles have not actually been applied, they are just the default. If you change these values, ie { opacity: 0.5, transform: "translateY(0)" }
, these values are not applied still.
This means in order to display an array of elements fading in, I need to first manually apply the style from the sequences array like this like this… which cant be right:
style={{ ...sequences[index].start, ...styles[index]}}
Expected behavior
The start
element styles to be applied before play
is set to true
.
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (3 by maintainers)
Top GitHub Comments
should be resolved by the latest patch. let me know
Thank you for fixing it so quickly.