[英]Icon is not exported from react-icons and compiler error is shown
我安裝了 react-icons 但它不工作
錯誤:FaBeer 未導出
import '../style/mobHeader.css'
import { FaBeer } from 'react-icons/fa';
const Mobileheader = () => {
return (
<div className="mob-header">
<h3>LoremIPSUM</h3>
<h3>LoremIPSUM </h3>
<FaBeer />
</div>
);
}```
從昨天開始也有這個問題。 似乎與最新版本(v4.3.0)有關。
您可以暫時安裝以前的版本 (v4.2.0),直到使用以下方法找到合適的解決方案:
npm install react-icons@4.2.0 --save
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.