How to go to the original version of the JavaScript library?

I am using PyCharm to develop my webApp (I am from the word python) and noticed: I cannot proceed to the source response.

For example: I want to look hot to expand the component, set the cursor to Component press Cmd + right mouse click and see cannot find declaration to go to .

 import React, { Component } from 'react' 

Is there a way to do this, or maybe there are other editors with such features?

Update: It seems to work only in WebStorm, but not in Pycharm. For Pycharm, you need to load the library in the settings.

+5
source share
1 answer

I can do this using the following setting:

  • WebStorm β†’ Settings β†’ Languages ​​and Framework β†’ JavaScript β†’ JavaScript Version: ReactJS (JSX Harmony)
  • Cmd + hover over the library, wait until it turns blue and underlined, and then (normal, left) click
  • WebStorm 2016.2.3

This is the state in which I just did cmd + hover. To go to the source code, you also need to click. This is the state in which I just did cmd + hover. To return to the starting position, you must also press.


Here is the same answer from an official source

From there, you can also go to the component definition using Cmd-click (Ctrl + click on Windows and Linux) by the name of the component or see the definition in a pop-up window using Cmd-Y (Ctrl + Shift + I).

+4
source

All Articles