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.

React 16 lifecycle errors appearing in a React 15 project

See original GitHub issue

I’m getting react/no-deprecated componentWillReceiveProps errors in a React 15 project 😢

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
maaydincommented, May 14, 2018

We have faced same error messages with react 16.2. Adding react version to .eslintrc file fixed the problem.

{
...
  "settings": {
    "react": {
      "version": "16.2.0"
    },
  }
...
}
2reactions
shockeycommented, May 12, 2018

Thanks @ljharb, I wasn’t aware of the pragma setting!

From my perspective, having my linter (and therefore, my build) break due to a changing default in this plugin was not a fun thing to discover. I do see that the plugin documents its changing default React target version (React version, default to the latest React stable release).

Perhaps a warning if a pragma is not present would provide a better experience than finding out the hard way when something like this happens?

Read more comments on GitHub >

github_iconTop Results From Across the Web

React 16 lifecycle errors appearing in a React 15 project #1789
I'm getting react/no-deprecated componentWillReceiveProps errors in a React 15 project Build log: ...
Read more >
Error Handling in React 16 – React Blog
As React 16 release is getting closer, we would like to announce a few changes to how React handles JavaScript errors inside components....
Read more >
componentDidCatch Life Cycle Method in Hindi / Urdu Tutorial
Error Handling in React 16 - componentDidCatch Life Cycle Method in ... will make 2 Project using React, React Router V4 & Mobx...
Read more >
Error after running NPM start on react project - node.js
<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:48:18) 12 verbose stack at ChildProcess.emit (events.js:182 ...
Read more >
2 Minutes to Learn React 16's componentDidCatch Lifecycle ...
Prior to React 16 Error Boundaries, errors inside components would cause unrecoverable cryptic errors. There was not a great way to handle ...
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