简体   繁体   中英

Icon is not exported from react-icons and compiler error is shown

I installed react-icons but it is not working

error: FaBeer not exported

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>
    );
}```

Been having this problem since yesterday too. Seems to be something to do with the newest version (v4.3.0).

You can install the previous version (v4.2.0) for now until a proper solution is found using:

npm install react-icons@4.2.0 --save

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM