![Sathya Gunasekaran Profile](https://pbs.twimg.com/profile_images/1627387769038282752/-LDyA2z5_x96.jpg)
Sathya Gunasekaran
@_gsathya
Followers
7K
Following
12K
Statuses
4K
@reactjs @meta; formerly: @v8js @google
London
Joined April 2009
@puruvjdev no because you have to manually call the setter to update state which is different from implicitly depending on the `position` object to synchronise state
1
0
6
@puruvjdev this a bit problematic as it can leading to cascading renders -- react is logging exactly this in your original example you've created a two way binding that you need to break
1
0
4
@puruvjdev yeah this isn't quite right you'll have to wrap the primitives separately in useDeferredValue and memo the onInput callback and create a memo wrapper component or just use the compiler if you don't want to memo manually are you running a prod build?
1
0
0
@puruvjdev ah its unused in the example code from the repo in that case use the return value from this hook in the component rather than duplicating state
2
0
0