preact/compat/dist/compat.module.js does not export 'unstable_flushControlled
- [x] Check if updating to the latest Preact version resolves the issue
Describe the bug
When building a preact application using parceljs and having draftjs as a dependency it'll output this message:
node_modules/preact/compat/dist/compat.module.js does not export 'unstable_flushControlled
I wonder if we can export this functionality or if this is completely out-of-scope for preact. If we do wish to export this, I can try to work around a patch if provided with some aid/guidance.
To Reproduce
I've created a sample/demo repository here: https://git.eletrotupi.com/parcel-preact-draftjs
Steps to reproduce the behavior:
- Clone the repository
- Install the deps
- Run
yarn build
Expected behavior
It should build a fully functional page
What type of module is calling this? Personally not a big fan of introducing the unstable_ prefixed ones even as a stub, generally you can easily add those as
export function unstable_flushControlled() {}
It's their src/components/base/DraftEditorFlushControlled component and I also wonder if it makes sense to add unstable_ functions to preact/compat, that's why I didn't even follow up this issue with a patch.
I'm going to close this on out as draft-js has been archived for a bit and there hasn't seemed to be any other modules making use of this in particular. We probably want to avoid unstable_ identifiers in general, but can decide on a case-by-case basis.