Closed xuanduc987 closed 2 years ago
Latest commit: 196501fc4ce52fa85b6433b5e9b0782ca302cb1e
The changes in this PR will be included in the next version bump.
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
Good catch, thanks for the PR!
Description
plate tried to remove editor state on unmount (https://github.com/udecode/plate/blob/ebc85b088c18a1c7e67fa9ed9ec78de7772898fa/packages/core/src/stores/plate/platesStore.ts#L28-L30) but the state was not deleted.
The reason is by default, zustand
set
tries to merge state instead of replacing old state with the new one. Set the second agrument ofset
to true would fix this problem.