d4rkr00t / prosemirror-dev-tools

Developer Tools for ProseMirror

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Doesn't work with React 16!

lostfictions opened this issue · comments

commented

Looks like this module (or one of its dependencies) is using React context without declaring context types? Not sure why it wouldn't have been showing a warning before, but it probably got upgraded to an error for React 16.

Here's a minimal repro case -- I just took the example CodeSandbox setup and updated react and react-dom to 16.0.0. https://codesandbox.io/s/jnlljqm3nw

commented

Looks like this is a problem with Cerebral -- I tried to upgrade its version to 2.2.2 (seemingly the last non-major version bump relative to the repo's current version "2.0.0-b-alpha.44b98c71") and the warning about childContextTypes went away, but now when trying to open the devtools it throws this: Cerebral - The function toggleDevTools in signal devToolsToggled is not given a valid payload

I don't use Cerebral and probably don't have any more time in the next little while to learn it to investigate a fix, sorry!

Thanks, I'll take a look at that.

Now i think choosing Cerebral was a huge mistake :( Looks like I'll have to refactor that

commented

Would have loved to have had this package to use for debugging ProseMirror issues over the past week -- let me know if I can do anything to help!

One solution in the interim would be to just move react and react-dom from peerDependencies into dependencies -- if this package depends on a specific version of React, it might as well be explicit about it, and let the package manager dedupe if it can. (Otherwise this library is unusable for anyone also using React until this bug is fixed!)