In VSCode, how can I get auto import suggestions for React built-in hooks, like useState
, useEffect
, etc?
Just like what we get in CodeSandbox:
Enabled extensions (maybe there is some conflict between them, though I'm not getting any errors):
In VSCode, how can I get auto import suggestions for React built-in hooks, like useState
, useEffect
, etc?
Just like what we get in CodeSandbox:
Enabled extensions (maybe there is some conflict between them, though I'm not getting any errors):
So, one thing you can do is try updating your local settings file:
inside your project directory:
<project>/.vscode/settings.json
{
// other vscode settings specific to this project...
"typescript.suggest.autoImports": true, // or
"javascript.suggest.autoImports": true
}