You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For some reason react input always jumps to the end of the field.
Try to type something, then change caret to anywhere else and type further.
Is Valtio doesn't work with controlled components or am I missing something?
importReactfrom"react";import{proxy,useSnapshot}from"valtio";// create a base proxyconststate=proxy({text: ""});exportdefaultfunctionApp(){const{ text }=useSnapshot(state);return(<inputvalue={text}onChange={(e)=>{state.text=e.target.value;}}/>);}
For some reason react input always jumps to the end of the field.
Try to type something, then change caret to anywhere else and type further.
Is Valtio doesn't work with controlled components or am I missing something?
Live demo:
https://codesandbox.io/s/valtio-input-bug-el7l7
The text was updated successfully, but these errors were encountered: