1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-01-19 14:27:07 +01:00

Add changes made to shouldNodeComponentUpdate to changelog of slate-react (#2417)

* When the component unmounts, make sure async commands don't trigger react updates.

* Eslint fix

* Add changes made to shouldNodeComponentUpdate to changelog of slate-react
This commit is contained in:
Gersom van Ginkel 2018-11-13 19:28:10 +01:00 committed by Ian Storm Taylor
parent 1d0a0e6cf6
commit 0c94ccebce

View File

@ -26,7 +26,7 @@ This document maintains a list of changes to the `slate-react` package with each
**Changes are now flushed to `onChange` asynchronously.** Previously this was done synchronously, which resulted in some strange race conditions in React environments. Now they will always be flushed asynchronously, just like `setState`.
**The `render*` and `decorate*` middleware signatures have changed!** Previously the `render*` and `decorate*` middleware was passed `(props, next)`. However now, for consistency with the other middleware they are all passed `(props, editor, next)`. This way, all middleware always receive `editor` and `next` as their final two arguments.
**The `render*`, `decorate*` and `shouldNodeComponentUpdate` middleware signatures have changed!** Previously the `render*`, `decorate*` and `shouldNodeComponentUpdate` middleware was passed `(props, next)`. However now, for consistency with the other middleware they are all passed `(props, editor, next)`. The `shouldNodeComponentUpdate` is passed `(prevProps, props, editor, next)`. This way, all middleware always receive `editor` and `next` as their final two arguments.
---