-
-
Notifications
You must be signed in to change notification settings - Fork 278
Closed
Description
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?
import React from "react";
import { proxy, useSnapshot } from "valtio";
// create a base proxy
const state = proxy({
text: ""
});
export default function App() {
const { text } = useSnapshot(state);
return (
<input
value={text}
onChange={(e) => {
state.text = e.target.value;
}}
/>
);
}luka-bacic and vincerubinetti
Metadata
Metadata
Assignees
Labels
No labels