mobxjs / mobx-react-devtools

[DEPRECATED] Tools to perform runtime analyses of React applications powered by MobX and React
MIT License
1.23k stars 49 forks source link

Cannot read property 'on' of undefined #117

Open zbeyens opened 5 years ago

zbeyens commented 5 years ago

I have this error when including <DevTools />

image

Using these packages:

"mobx": "^5.9.4",
"mobx-react": "^6.0.2",
"mobx-react-devtools": "^6.1.1",
"react": "16.8.6",
"react-dom": "16.8.6",
"react-scripts": "^3.0.1",
Kizmar commented 5 years ago

Same issue here after updating from version 6.0.3 to 6.1.1 (in addition to several other packages). Reverted back to version 6.0.3 and I'm still getting the error. Must be related to other packages being updated? I have all the same package versions @zbeyens listed.

This is what I had previously that was working (with 6.0.3): "mobx": "^5.9.0", "mobx-react": "^5.4.3", "mobx-react-router": "^4.0.5", "react": "^16.7.0", "react-dom": "^16.7.0", "react-router-dom": "^4.3.1", "react-scripts": "2.1.8",

mweststrate commented 5 years ago

Note that the DevTools package is not compatible with mobx-react@6 (see the changelog of that package)

On Fri, May 31, 2019 at 6:25 PM Nicholas Westbrook notifications@github.com wrote:

Same issue here after updating from version 6.0.3 to 6.1.1 (in addition to several other packages). Reverted back to version 6.0.3 and I'm still getting the error. Must be related to other packages being updated? I have all the same package versions @zbeyens https://github.com/zbeyens listed.

This is what I had previously that was working (with 6.0.3): "mobx": "^5.9.0", "mobx-react": "^5.4.3", "mobx-react-router": "^4.0.5", "react": "^16.7.0", "react-dom": "^16.7.0", "react-router-dom": "^4.3.1", "react-scripts": "2.1.8",

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/mobxjs/mobx-react-devtools/issues/117?email_source=notifications&email_token=AAN4NBBWSIYC2FGAXA6T3L3PYFGOFA5CNFSM4HR3SZU2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWVWWKA#issuecomment-497773352, or mute the thread https://github.com/notifications/unsubscribe-auth/AAN4NBAM65K7TGPW6LWVX4TPYFGOFANCNFSM4HR3SZUQ .

Kizmar commented 5 years ago

The MobX-react devtools (either as package or browser plugin) are no longer supported. Instead, the following tools can be analyzed to analyze your mobx-react application:

  • Visualizing re-rendering of components is now part of the standard React devtools
  • The dependency tree of a compent tree can be inspected by showing the state of the useObserver hook in the React devtools (at the time of this release it displays as just Object, but the next iteration of the React devtools will support those properly)
  • Spying on events can still be done with the MobX-react browser plugin, through the mobx-logger package or manually by using the spy or trace utility from the mobx package.