[QUESTION] Collect motion element dimensions
See original GitHub issueHello 👋
I’m working on a button to input animation (codesandbox) and I need to measure motion elements when the component mounts using useLayoutEffect
to prevent flashing and animating on load. For some reason, ref.current
is not available when the hook fires. I’m assuming because motion
needs to know about it? Is there any way to grab the dimensions before the first paint? I appreciate any help 🙏.
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Chapter 3 KINEMATICS IN TWO DIMENSIONS PREVIEW
Two-dimensional motion includes objects which are moving in two directions at the same time, such as a projectile, which has both horizontal and...
Read more >Properties of Periodic Motion - The Physics Classroom
The measurements were based upon readings of a position-time graph. The data on the graph was collected by a motion detector that was...
Read more >Understanding Formal Analysis - Getty Center
It is one-dimensional and can vary in width, direction, and length. Lines often define the edges of a form. Lines can be horizontal,...
Read more >Motion Graphics Templates - Frequently Asked Questions
Everything you need to know about Motion Graphics templates for Premiere Pro. We answer all the FAQs on the new MOGRT file type!...
Read more >6 Ways to Motion Track in After Effects
What can you use motion tracking for? · Stabilize motion by utilizing tracking data. · Add elements such as text or solids to...
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
That is a fantastic idea
Not to get off-topic, but maybe a first-class way to access dimensions could help? I know you need to do measurements in certain use-cases like FLIP, it might be nice to expose a hook to read dimensions at the same time framer does to save from having to read from the DOM twice.