Skip to content

feat: add "getGoalValue" method to animated #789

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

Closed
wants to merge 2 commits into from

Conversation

guopengliang
Copy link
Contributor

Updated the controller to set/update the goal value to each AnimatedValue upon animation starts and stops.
Proposed in #785.

aleclarson and others added 2 commits August 19, 2019 15:06
This is a bug in TypeScript that manifests in @types/react.

This commit is temporary pain relief for pmndrs#613. The "ref" prop is no longer typed.

More info here: microsoft/TypeScript#29949
Updated the controller to set/update the goal value to each AnimatedValue upon animation starts and stops.
@aleclarson
Copy link
Contributor

With #808, you can do this:

const {width} = useSpring({ width: 0 })
width.get('to') // and others

Or just get the current value with:

width.get()

@aleclarson aleclarson closed this Sep 11, 2019
@guopengliang
Copy link
Contributor Author

@aleclarson Awesome! That makes more sense. 👍

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.

2 participants