'ReactNative.Component' warning needs to give source filename and line number
See original GitHub issueWhen updating a React Native project from a pre-0.25.x version to a post-0.25.x version
This:
Seems you're trying to access 'ReactNative.Component' from the 'react-native' package. Perhaps you meant to access 'React.Component' from the 'react' package instead?
For example, instead of:
import React, { Component, View } from 'react-native';
You should now do:
import React, { Component } from 'react';
import { View } from 'react-native';
Check the release notes on how to upgrade your code - https://github.com/facebook/react-native/releases/tag/v0.25.1
is a pretty common error message. It’s also completely useless. It’s not a big problem when hunting through one’s own code for deprecated references. The problem happens if this is being triggered by something in an imported npm module. Then it becomes a game of auditing other people’s code, which sort of defeats the purpose of pulling in npm modules completely. A filename and line number would at least give some clue as to which module needs to be upgraded.
Every error in React Native gives a filename and line number, (And they’re almost always spot-on, which is unheard of in JavaScript) except this one. Why make an exception here?
Issue Analytics
- State:
- Created 7 years ago
- Reactions:27
- Comments:25 (2 by maintainers)
Top Results From Across the Web
Is it possible to get the line number of an error in React ...
Answer is NO for most cases. The screen you shared here is of very little use for knowing where error is coming from....
Read more >React Native Error Handling Best Practices
A source map will help you when handling and debugging a React Native error because it will show you the exact line in...
Read more >Lists and Keys
First, let's review how you transform lists in JavaScript. Given the code below, we use the map() function to take an array of...
Read more >Google JavaScript Style Guide
1 Introduction. This document serves as the complete definition of Google's coding standards for source code in the JavaScript programming language.
Read more >rollup.js
You can provide an optional Rollup configuration file to simplify command line usage and enable advanced Rollup functionality. Configuration Files. Rollup ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This error is killing me.
Here