Here an example is given how to import certain classes from a module:
import {ModalContainer, ModalDialog} from 'react-modal-dialog';
However, PhpStorm (latest EAP) gives me an error:
I installed the package with npm install react-modal-dialog
and it is present in node_modules
.
The equivalent var {ModalContainer, ModalDialog} = require('react-modal-dialog');
works fine.
I encountered this when setting up a React project and all i did was download the import's typescript definition, in my case just searched for react
.
Instructions for adding libraries to your project can be found on webstorm's help page.