Add onLayout native events for Reanimated 2
See original GitHub issueDescription
onLayout handler should work on UI thread
Motivation
measure()
measures paddings with some infelicity, while onLayout returns correct height/width/etc.
Example
The following example is default accordion animation with opened/closed component inside
-
Closed => Open transition (height)
-
Open => Closed transition (height)
Issue Analytics
- State:
- Created 3 years ago
- Reactions:13
- Comments:9 (8 by maintainers)
Top Results From Across the Web
Events | React Native Reanimated - Software Mansion
Reanimated 2 integrates tightly with the react-native-gesture-handler package ... Next, we add an event handler to it — it will react to notifications...
Read more >Developers - Add onLayout native events for Reanimated 2 -
Description. onLayout handler should work on UI thread. Motivation. measure() measures paddings with some infelicity, while onLayout returns correct ...
Read more >Newest 'react-native-reanimated-v2' Questions - Stack Overflow
What I tried so far: onLayout doesn't fire on reanimated events. ... to start an animation from a button onPress event using React...
Read more >Animations in React Native: Performance and Reason-about ...
Introducing React Native Reanimated (Version 2) ... Animations alone are a pretty great way to add some polish to a mobile app.
Read more >React Native Animations: a Guide on Creating ... - UpsilonIT
The worklets can serve as event handlers. It is possible to define a separate worklet for handling each handler state. Though Reanimated version...
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
I would go with that approach. It gives freedom to the developer.
@terrysahaidak @AlexeyVlasenko Could you open a topic about that in discussion? This is more a feature request then issue.