Visual Studio can't suggest my prop types
See original GitHub issueIs this a bug report?
Yes
Did you try recovering your dependencies?
Yes
Which terms did you search for in User Guide?
Props, PropTypes, VS Code
Environment
VS Code: 1.33.1
System:
OS: Windows 10 - 10.0.17763.437
CPU: (4) x64 Intel(R) Core(TM) i5-7300HQ CPU @ 2.50GHz
Binaries:
Node: 10.13.0 - C:\Program Files\nodejs\node.EXE
Yarn: 1.15.2 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
npm: 6.9.0 - C:\Program Files\nodejs\npm.CMD
Browsers:
Edge: 44.17763.1.0
Internet Explorer: 11.0.17763.1
I have Chrome and Firefox too
npmPackages:
react: ^16.8.6 => 16.8.6
react-dom: ^16.8.6 => 16.8.6
react-scripts: 3.0.0 => 3.0.0
npmGlobalPackages:
create-react-app: Not Found
Steps to Reproduce
jsconfig.json
places in my global folder (not in src):
{
"compilerOptions": {
"jsx": "react",
"baseUrl": "./src"
}
}
I installed React PropTypes Intellisense
extension into VS Code
- Write propTypes
- In your component, type
this.props.
and hit [Ctrl] + [Space] to show suggestions
Expected Behavior
My PropTypes should be in suggestion window
Actual Behavior
It’s also didn’t work outside of component - I only have ref
, children
and key
suggestions from React
Reproducible Demo
Not needed - it’s default CRA setup 3.0.0
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:14 (1 by maintainers)
Top Results From Across the Web
How to make vs code autocomplete React component's prop ...
P.S.: I'm using JS, not TS. reactjs · visual-studio-code · intellisense · jsx · javascript-intellisense.
Read more >React PropTypes Intellisense - Visual Studio Marketplace
The extension finds React PropTypes and adds them to the suggestion list. ... It works for all implementations of the "PropTypes" feature, i.e. ......
Read more >Using JSDoc to enable intellisense for render props in vscode
vscode uses typescript internally, and in most cases, it can automatically infer types from type-definitions, JSDoc comments or proptypes. For ...
Read more >How to validate React props using PropTypes - LogRocket Blog
Learn how to validate props with React PropTypes, React's internal mechanism for adding type checking to component props.
Read more >IntelliSense in Visual Studio - Microsoft Learn
A list of valid members from a type (or namespace) appears after you ... You can't use IntelliSense if the cursor is in...
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 FreeTop 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
Top GitHub Comments
a
I’ve read these topics and tried this extensions… but nothing. I just want intellisense for the defined propTypes when the component is used from other components.