-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptFixedA PR has been merged for this issueA PR has been merged for this issue
Milestone
Description
From @mdo5004 on June 8, 2018 14:47
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
Copied from original issue: microsoft/vscode#51459
benoitgrelard, hytromo, bernatfortet, moshfeu, erikmartinessanches and 2 more
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptFixedA PR has been merged for this issueA PR has been merged for this issue