[英]VS Code Intelli-sense does not show suggestions for react-icons even after installing react-icons properly using npm
I installed react-icons library using the command,我使用命令安装了 react-icons 库,
npm install react-icons --save
npm 安装 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.然后我尝试在 VS Code 编辑器中编写导入 IoIosStarOutline 图标的导入语句,然后它的智能感知不建议图标的名称。 I even tried importing FaBeer icon in VS Code, it still does not suggest it.
我什至尝试在 VS Code 中导入 FaBeer 图标,它仍然不建议这样做。 I installed latest ES7 React extensions but nothing seems working.
我安装了最新的 ES7 React 扩展,但似乎没有任何效果。
It only shows suggestion for IconBase from react-icons.它仅显示来自 react-icons 的 IconBase 建议。
What must be the problem?一定是什么问题? I am stuck, can anyone help?
我被困住了,有人可以帮忙吗? I am using UBUNTU os.
我正在使用 UBUNTU 操作系统。
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.经过几次试用后,我发现开发人员必须首先编写导入语句的 from "react-icons/io" 部分,然后导入建议图标的名称。
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.
但我要最后指出 VS Code 应该注意这件事,因为 react-icons 是广泛使用的库,而且有些名称非常大,以至于智能感知是唯一的选择。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.