mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
13 lines
257 B
JavaScript
13 lines
257 B
JavaScript
// @memoizeJsxElements false
|
|
function Component(props) {
|
|
const [name, setName] = useState(null);
|
|
const onChange = function (e) {
|
|
setName(e.target.value);
|
|
};
|
|
return (
|
|
<form>
|
|
<input onChange={onChange} value={name} />
|
|
</form>
|
|
);
|
|
}
|