diff --git a/packages/slate-react/src/components/editor.js b/packages/slate-react/src/components/editor.js index 2e2aea6ce..c03901ba2 100644 --- a/packages/slate-react/src/components/editor.js +++ b/packages/slate-react/src/components/editor.js @@ -122,6 +122,14 @@ class Editor extends React.Component { } } + /** + * When the component unmounts, make sure async commands don't trigger react updates. + */ + + componentWillUnmount() { + this.tmp.mounted = false + } + /** * Render the editor. *