Issue with AnimateStyle<> typing
See original GitHub issueWhile the typing supports perfectly top-level properties and style properties (kudos to that because the RN Animated API types them as any), there seems to be an issue with transform properties which are one level of nesting deeper.
For instance:
const scale = new Value(1);
const opacity = new Value(1);
<Animated.View style={{ opacity }} /> // Work great
<Animated.View style={{ transform: [{ scale }] }} /> // type error
I looked at the type definition AnimateStyle
in react-native-reanimated.d.ts
but this type definition is challenging for me to understand. I would love to help to solve this issue if pointed to the right direction though.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:3
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Issue with AnimateStyle<> typing #297 - GitHub
I looked at the type definition AnimateStyle in react-native-reanimated.d.ts but this type definition is challenging for me to understand. I ...
Read more >Unsure what type my prop is in react native typescript
I am trying to implement typescript into my project and I am having issues giving prop types to my swipe prop.
Read more >How to Create a Typing Effect in Canva - YouTube
HOW TO CREATE A TYPING EFFECT IN CANVA | CANVA VIDEO ANIMATION TUTORIAL If you are looking for a fun animated video effect...
Read more >Advanced "Fall in place" typewriting effect? - DevForum | Roblox
I know how to make a basic typewriter effect, but I want to achieve this unique effect and going through the posts I...
Read more >Animate.css | A cross-browser library of CSS animations.
Animate.css is a library of ready-to-use, cross-browser animations for you to use in your projects. Great for emphasis, home pages, sliders, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
And here’s the type error I’m getting
Same issue
Gives error
Type 'Animated.Value(0)' is not assignable to type 'number'