bug: react animations CreateAnimation component not working and wrongly documented
See original GitHub issueBug Report
Ionic version: [x] 4.x
Current behavior: CrateAnimation tag expects only one element in fromTo attribute
Expected behavior: fromTo?: PropertyValue; is expected to be fromTo?: PropertyValue[]; in CreateAnimationProps based on the documentation
Steps to reproduce: follow this documentation example found in https://ionicframework.com/docs/utilities/animations:
Related code:
<CreateAnimation
duration={1500}
iterations={Infinity}
fromTo={[
{ property: 'transform', fromValue: 'translateX(0px)', toValue: 'translateX(100px)' },
{ property: 'opacity', fromValue: '1', toValue: '0.2' }
]}
>
...
</CreateAnimation>
Other information: Also this code didn’t work, I was expecting a simple animation and nothing happened when the component loaded
<CreateAnimation
duration={1000}
fromTo={{
property: 'opacity',
fromValue: '1',
toValue: '0'
}}
>
<div>example animation</div>
</CreateAnimation>
Ionic info:
Ionic:
Ionic CLI : 6.2.0 (/usr/local/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/react 5.0.5
Capacitor:
Capacitor CLI : 1.5.1
@capacitor/core : 1.5.1
Utility:
cordova-res : not installed
native-run : 0.3.0
System:
NodeJS : v10.15.3 (/usr/local/bin/node)
npm : 6.4.1
OS : macOS Mojave
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Animation not working on component in ReactJS.
The problem is in the css. I think you should make separated classes for the login and incorrect-login. .login { margin: 4px auto; ......
Read more >React scroll animations with Framer Motion - LogRocket Blog
Learn how to use Framer Motion to create scroll animations for a React app. Create stunning animations without CSS.
Read more >Using the CreateAnimation Wrapper Component in an Ionic ...
I've been working on a lot of animations with React and the Ionic Animations API as I create the React edition for Advanced...
Read more >Introduction to Angular animations
Let's create a new open-close component to animate with simple transitions. Run the following command in terminal to generate the component: content_copy ng...
Read more >.animate() | jQuery API Documentation
The .animate() method allows us to create animation effects on any ... fadeIn() , the .animate() method does not make hidden elements visible...
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
Thanks for the issue! This has been resolved via https://github.com/ionic-team/ionic/pull/20775 and will be available in an upcoming release of Ionic Framework.
You’re my today’s favorite person. Thanks again