Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to identify source of React.createClass warning? React v15.6

Tags:

reactjs

How can I identify the dependency that is causing the warning?

Warning: Accessing createClass via the main React package is deprecated, and will be removed in React v16.0....

I understand the changes that are coming with React v16.0. I want to help the dependency resolve the warnings but I don't know who needs help.

Package.json

"dependencies": {
    "autosuggest-highlight": "^3.1.0",
    "material-ui": "next",
    "material-ui-icons": "^1.0.0-alpha.19",
    "nuka-carousel": "^2.2.1",
    "react": "^15.6.1",
    "react-autosuggest": "^9.3.2",
    "react-dom": "^15.6.1",
    "react-helmet": "^5.1.3",
    "react-router-dom": "^4.1.2",
    "react-tap-event-plugin": "^2.0.1",
    "typeface-roboto": "^0.0.35"
  },
  "devDependencies": {
    "enzyme": "^2.9.1",
    "jest-enzyme": "^3.6.1",
    "react-scripts": "^1.0.10",
    "react-test-renderer": "^15.6.1"
  },
like image 530
GerritVK Avatar asked May 28 '26 11:05

GerritVK


1 Answers

  1. You see next to the warning in the console the line of it. Jump to that line in the chrome-debugger, (just click on it)
  2. Set a break-point there
  3. Reload the page, and you'll get there
  4. Next, in the debugger there is the stack tab, open it, to see all the functions path to that line.. You should be able to identify the problematic source
like image 97
webdeb Avatar answered May 31 '26 18:05

webdeb



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!