React intellisense in Visual Studio Code

后端 未结 5 1947
忘了有多久
忘了有多久 2021-01-31 18:39

I\'m sure I\'m missing something simple, but I simply can\'t get React.js IntelliSense to work in Visual Studio code.

I have done the following:

  • npm
5条回答
  •  不思量自难忘°
    2021-01-31 19:15

    If anyone else encounters this question in March or April 2016, you might also wish to check this issue in github to see if it has been closed:

    https://github.com/Microsoft/vscode-react-native/issues/61

    Essentially, using import React, { Component } from 'react' ES6-style module import causes Salsa's Intellisense not to work, the workaround is to use require:
    var React = require('react'); var { Component } = React;

提交回复
热议问题