Skip to content

How do I run a set function in v9? #1383

Discussion options

You must be logged in to vote

Would this work?

const [ spring, api ] = useSpring(() => config)

useEffect(() => {
  api.current[0].set(config)
}, [someDependency])

It's quite hard to debug without an example. Tbh I'm not super familiar with using deps in the spring.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@inspectordanno
Comment options

@joshuaellis
Comment options

@inspectordanno
Comment options

Answer selected by inspectordanno
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants