Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

animationIterationCount has wrong type for 2 or more animations #1044

Closed
jdecked opened this issue Jul 21, 2018 · 0 comments
Closed

animationIterationCount has wrong type for 2 or more animations #1044

jdecked opened this issue Jul 21, 2018 · 0 comments
Assignees
Milestone

Comments

@jdecked
Copy link
Contributor

jdecked commented Jul 21, 2018

Do you want to request a feature or report a bug?
A bug.

If the current behavior is a bug, please provide the steps to reproduce and
if a minimal demo of the problem via Glitch or similar (template:
https://glitch.com/edit/#!/react-native-web-playground).

Glitch demo code: https://glitch.com/edit/#!/zesty-carpenter?path=src/App/index.js:46:2
Live Glitch demo: https://zesty-carpenter.glitch.me/

Reproduction steps:

  1. Create a component which uses StyleSheet for styling and apply styles.animation:
var styles = StyleSheet.create({
  animation: {
    animationDuration: '1s, 2s',
    animationIterationCount: '1, infinite',
    animationName: [
      {
        from: { top: '2em' },
        to: { top: 0 }
      },
      {
        '15%': {
          transform: [{ scale: 2 }],
          backgroundColor: 'red'
        },
        '30%': {
          transform: [{ scale: 1 }]
        }
      }
    ]
  }
})
  1. Run the project locally and open the Developer Tools console.
  2. Realize there's an error: Warning: Failed prop type: Invalid prop animationIterationCountsupplied toView.

What is the expected behavior?
animationIterationCount should accept string values for multiple animations, much in the same way animationDuration does. There should be no Failed prop type error.

OS: macOS Sierra 10.13.6
Browser: Chrome 67.0.3396.99
React Native for Web (version): 0.8.8
React (version): 16.3.1

@necolas necolas added the has-PR label Sep 9, 2018
@necolas necolas removed the has-PR label Sep 19, 2018
@necolas necolas added this to the 0.10.0 milestone Dec 31, 2018
@necolas necolas modified the milestones: 0.10.0, 0.11.0 Jan 30, 2019
@necolas necolas self-assigned this Mar 7, 2019
necolas added a commit that referenced this issue Mar 8, 2019
The CSS base styles for certain primitives are implemented using classic CSS to
reduce browser layout times and better support 'null' values in
StyleSheet-defined styles. Combined with the previous patch this reduces the
benchmark layout times by about 30%.

Ref #1136
Fix #1044
Fix #1223
Fix #13
@necolas necolas added the has-PR label Mar 8, 2019
necolas added a commit that referenced this issue Mar 11, 2019
The CSS base styles for certain primitives are implemented using classic CSS to
reduce browser layout times and better support 'null' values in
StyleSheet-defined styles. Combined with the previous patch this reduces the
benchmark layout times by about 30%.

Ref #1136
Fix #1044
Fix #1223
Fix #13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants