question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Draft.js API improvements in 0.10.0 and 0.11.0

See original GitHub issue

What: 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:closed
  • Created 7 years ago
  • Reactions:83
  • Comments:13 (6 by maintainers)

github_iconTop GitHub Comments

11reactions
tobiasandersencommented, Jan 28, 2017

Awesome! Great job @flarnie 🥇

11reactions
flarniecommented, Jan 28, 2017

Just an update - we released 0.10.0, including the deprecation of DraftEntity and the new API for managing DraftEntity records.

Next steps:

  • Publish v0.11.0@next for beta testing
  • Publish any intermediate bug fixes at v0.10.1
  • Internal testing of v0.11.0 on Facebook’s wide range of use cases
  • Release v0.11.0 and continue doing regular releases in the future
Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found