Skip to content

Update animations.md with .map and useAnimatedStyle example#1582

Closed
jakequade wants to merge 2 commits intosoftware-mansion:masterfrom
jakequade:master
Closed

Update animations.md with .map and useAnimatedStyle example#1582
jakequade wants to merge 2 commits intosoftware-mansion:masterfrom
jakequade:master

Conversation

@jakequade
Copy link

Description

Adds a basic example for adding animated styles to mapped elements, after I encountered this issue and couldn't immediately see the reason from the docs.

Changes

  • Updates animations.md with an example of incorrect and correct usages of useAnimatedStyle inside of a map function.

Screenshots / GIFs

Viewable in diff - no other change

Added an example of how to map over elements, as you cannot use the one animated style for multiple elements
@jakequade
Copy link
Author

Hey team! Hope this is kosher - just a minor change to the docs. Keen on thoughts :) have a splendid new years!

@mrousavy
Copy link
Contributor

I believe the PR #1470 will change the behaviour of useAnimatedStyle so that it can actually be used for multiple components, so the first "broken" example will work once that has been merged.

@piaskowyk
Copy link
Member

piaskowyk commented Dec 31, 2020

Yes, exactly like @mrousavy said. My PR should resolve the problem with usage animation style for multiple components, but now my PR is waiting for review.

@jakequade
Copy link
Author

Ah - sorry about that! I wasn't aware :) Shall I close?

@piaskowyk
Copy link
Member

No problem :) Thank for your commitment - I appreciate this but unfortunately I must cancel this PR because I hope we can use style to multiple components soon.

@piaskowyk piaskowyk closed this Jan 4, 2021
@jakequade
Copy link
Author

No worries! Thanks for your time

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

Successfully merging this pull request may close these issues.

3 participants