Editor: Refactor currentPost state to use core-data package #16520
Labels
[Package] Core data
/packages/core-data
[Package] Editor
/packages/editor
[Type] Code Quality
Issues or PRs that relate to code quality
Previously: #16402 (comment)
The editor maintains a copy of the original post being edited in its state, as
currentPost
. This value is always representative of the last saved value of the post; edits are maintained separately. There should be effectively no difference between this value and what would be produced by...By using the entity provided from the
core-data
data store, we gain some benefit:core-data
entities (and a subsequent refactor ofsavePost
to usecore-data
as well)Implementation Specifics:
For the most part, the crux of the implementation requires changing...
gutenberg/packages/editor/src/store/selectors.js
Lines 156 to 158 in 8995efd
...to:
Some details:
getPost
etc. auto-generated for entities?)The text was updated successfully, but these errors were encountered: