Draft.js API improvements in 0.10.0 and 0.11.0
See original GitHub issueWhat: The API for managing entities will be moved from the global Entity
module into contentState
, with a deprecation warning in v0.10.0 and a full breaking change in v0.11.0.
Why:
- currently changing or adding entities won’t trigger a re-render. This is a big pain!
- the use of a non-Immutable storage for entities doesn’t fit well with the rest of the Draft architecture
- moves Entity storage out of global module; this just makes more sense as an API, rather than having it globally available. Other maintainers - feel free to add detail and say this more eloquently.
Will 0.10.0 include breaking changes?
Nope! When you update to v0.10.0, you should start seeing warnings in the console when the old Entity
module API is used. The new API, using contentState
will be supported, and you can migrate to the new API incrementally.
We will put out documentation about how to update all use cases when releasing 0.10.0.
Once you are fully migrated to the new API, you can update to 0.11.0, which will include the fully breaking change and will also include the benefits of the new API.
What’s taking so long???
- Since we are improving the API in a breaking way, we are doing extra testing and preparing documentation to make the 0.10.0 and 0.11.0 releases run smoothly.
- We are a tiny team with other projects, and so thanks for everyone’s patience! We are actively working on catching up, and there are discussions ongoing for how to improve the state of this project. See #835.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:83
- Comments:13 (6 by maintainers)
Top Results From Across the Web
draft-js/CHANGELOG.md - UNPKG
1, # Changelog. 2. 3, Notable changes to Draft.js will be documented in this file. 4. 5, Changes to `src` are live in...
Read more >draft-js | Yarn - Package Manager
Immutable Editor State: The Draft. js model is built with immutable-js, offering an API with functional state updates and aggressively leveraging data ...
Read more >draft-js v0.11.7 - npm.io
Draft.js is a JavaScript rich text editor framework, built for React and backed by an immutable model. Extensible and Customizable: We provide the...
Read more >Changelog - OpenTripPlanner 2
Changelog. The changelog list most feature changes between each release. The list is automatically created based on merged pull requests.
Read more >Overview | Draft.js
Draft.js is a framework for building rich text editors in React, powered by an immutable model and abstracting over cross-browser ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Awesome! Great job @flarnie 🥇
Just an update - we released 0.10.0, including the deprecation of
DraftEntity
and the new API for managingDraftEntity
records.Next steps: