Closed FireworksX closed 1 week ago
Resolve as
const Input = animated(({ value, onChange }) => {
return <input type="number" value={value} onChange={e => onChange(+e.target.value)} />
})
<Input value={custom.value} onChange={v => customApi.start({ value: v })} />
Which react-spring target are you using?
@react-spring/web
@react-spring/three
@react-spring/native
@react-spring/konva
@react-spring/zdog
What version of react-spring are you using?
9.7.3
What's Wrong?
When try to use
animated.input
with useSpring or new SpringValue input don't react on update.To Reproduce
const [custom, customApi] = useSpring(() => ({ value: 1 }))
<animated.input value={custom.value} />
customApi.start({ value: 5 })
Expected Behaviour
Input should react on spring
Link to repo
https://codesandbox.io/p/sandbox/romantic-jepsen-6cnjc7