1

I installed react-icons library using the command,

npm install react-icons --save

It installed well.

Then I tried writing import statement for importing IoIosStarOutline icon in VS Code editor, then its intelli-sense does not suggest the name of the icon. I even tried importing FaBeer icon in VS Code, it still does not suggest it. I installed latest ES7 React extensions but nothing seems working.

It only shows suggestion for IconBase from react-icons.

What must be the problem ? I am stuck, can anyone help? I am using UBUNTU os.

Deepeshkumar
  • 217
  • 3
  • 11

1 Answers1

1

After several tryouts I found that developer has to first write the from "react-icons/io" part of the import statement and then the import suggests the names of icons.

Problem is solved. But I would close on a note that VS Code should pay attention to this thing, as react-icons is widely used library and some names are so huge that intellisense is the only option.

Deepeshkumar
  • 217
  • 3
  • 11
  • Yeah, manually entering the import works, I usually find the icon using [the main page](https://react-icons.github.io/react-icons/) and the prefix tells you what to import (e.g. "FaSomeIcon" means that you have to import 'react-icons/fa') – Cat-Lord Sep 29 '22 at 09:26