A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/RIP21/react-simplemde-editor/issues/150 below:

Trying to use hook(useState) set value and onchange will lose focus · Issue #150 · RIP21/react-simplemde-editor · GitHub

I trying to use hook (useState) to set value and onchange value,
but always lose the focus, when key in something.

thanks.

const [markdownValue, setMarkdownValue] = useState("");

const handleChange = value => {
    setMarkdownValue(value);
};

<SimpleMDEReact value={value} onChange={handleChange}  />


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4