Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

VS Code Auto Import is bugging usestate

PROBLEM: VSCode autoimports the wrong react library. For example:

Typing useState() will result to either of the following:

import { useState } from "react/cjs/react.production.min"; 
import { useState } from "react/cjs/react.development";

instead of: import { useState } from "react";

SOLUTION: npm install -D @types/react
Source by github.com #
 
PREVIOUS NEXT
Tagged: #VS #Code #Auto #Import #bugging #usestate
ADD COMMENT
Topic
Name
7+8 =