question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

bug: react animations CreateAnimation component not working and wrongly documented

See original GitHub issue

Bug 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:closed
  • Created 4 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
liamdebeasicommented, Mar 13, 2020

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.

1reaction
nmobregoncommented, Mar 13, 2020

You’re my today’s favorite person. Thanks again

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found