Description
Which react-spring target are you using?
-
@react-spring/web
-
@react-spring/three
-
@react-spring/native
-
@react-spring/konva
-
@react-spring/zdog
What version of react-spring are you using?
9.7.5
What's Wrong?
Animated tags don't seem to support children prop for TypeScript. This seems similar to issue #2332, but I'm not using Next 15/React 19, I am currently using Next 14.2.24 and React 18.3.1.
The animated.div only has an SVG (made React component by SVGR) as a child. While I was able to get around the issue by using the animated function instead and passing a component in there (i.e. see second image, there are no typescript errors present there), I'm sure there would be situations where having animated.div take children would be preferable compared to defining a component separately.
To Reproduce
Use an animated tag with children elements
Expected Behaviour
No Typescript issue
Link to repo
No public repo currently