Skip to content

using update function gives error #992

Answered by aleclarson
thomijn asked this question in Support
Discussion options

You must be logged in to vote

To get an array back from useSpring, you need to pass a props function or a dependency array.

useSpring(() => ({ x: 0, y: 0 })
// or
useSpring({ x: 0, y: 0 }, [])

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by aleclarson
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants