-
Notifications
You must be signed in to change notification settings - Fork 38.8k
Closed
Labels
bugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bugupstreamIssue identified as 'upstream' component related (exists outside of VS Code)Issue identified as 'upstream' component related (exists outside of VS Code)verifiedVerification succeededVerification succeeded
Milestone
Description
VSCode thinks there are 2 definitions of a React Component
This issue was brought up recently but without sufficient info. Here is a minimal reproduction example:
- VSCode Version: 1.24.0
- OS Version: MacOS High Sierra 10.13.4 (17E202)
Steps to Reproduce:
- Create a React app
$ create-react-app my-bug-example
$ code my-bug-example- Change src/App.js to
import React, { Component } from 'react';
class App extends Component {
render() {
return (
<div className="App">
<MyComponent />
</div>
);
}
}
export default App;
class MyComponent extends Component {
render(){
return <MySingleComponent text="Instance 1" />
}
}
class MySingleComponent extends Component {
render(){
return <p>{text}</p>
}
}
- CMD + hover on
<MySingleComponent text="Instance 1" />
- CMD + click on
<MySingleComponent text="Instance 1" />
Does this issue occur when all extensions are disabled?: Yes
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bugupstreamIssue identified as 'upstream' component related (exists outside of VS Code)Issue identified as 'upstream' component related (exists outside of VS Code)verifiedVerification succeededVerification succeeded

