chenglou / chenglou/react-motion

Get component styles before animation?

Open
#529 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
21.9k
Forks
1.1k
PR merge metrics
No merged PRs in 30d

Description

Hey!

Im wondering how to get component styles before the TransitionMotion animation happens.

I have an animation that is bringing something to full scale. It takes a component, starts scale at 0 then tweens it to 1.

I need to check the height of the component that is going to be animated incase it is too large, I am only able to get the height information after the animation happens in the parent componentDidUpdate method.

Anyone have suggestions on how to solve for this?

Thanks

Contributor guide

No contributing guide indexed for this repository

Research direction

No source files or tests are named. Start by tracing the TransitionMotion lifecycle and the parent componentDidUpdate timing, then determine whether component dimensions can be measured before the scale animation begins. Done would require a clearly specified, reproducible approach or project change for obtaining the pre-animation height.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.