RIP21 / react-simplemde-editor

React wrapper for simplemde (easymde) markdown editor

Home Page:https://react-simplemde-edtior.netlify.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Trying to use hook(useState) set value and onchange will lose focus

Kseng opened this issue · comments

commented

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}  />

This has been fixed in 5.0.0 please update and note breaking changes.

commented

@RIP21 Great , thanks a lot of.