reactstrap 中缺少列表
List missing from reactstrap
我正在尝试向网页添加页脚。它看起来像这样:
import React from 'react';
import { Row, Col, List, ListInlineItem } from 'reactstrap'
import { HashLink } from 'react-router-hash-link';
import { Link } from 'react-router-dom';
import logo from './../assets/logo.png'
export function Footer(props) {
return (
<div>
<hr />
<Row>
<Col xl="2" lg="2" className="d-none d-lg-block">
<img src={logo} className="img-side" alt="Loading..." />
</Col>
<Col xl="8" lg="8" md="12" sm="12" xs="12">
<center>
<small>
<p><a href="">Privacy Policy</a></p>
<List type="inline">
<ListInlineItem>
<Link to="/">Home</Link>
</ListInlineItem>
<ListInlineItem>
<HashLink to="/#product">Product</HashLink>
</ListInlineItem>
<ListInlineItem>
<Link to="/overview">Solution</Link>
</ListInlineItem>
<ListInlineItem>
<HashLink to="/#getintouch">Contact Us</HashLink>
</ListInlineItem>
</List>
<p><a href="">Subscribe to Newsletter</a></p>
</small>
</center>
</Col>
</Row>
</div>
);
}
当我尝试将此页面竖起时,出现以下错误:
Attempted import error: 'List' is not exported from 'reactstrap'.
我不确定是什么原因造成的,因为 List
记录在 Reactstrap 网站上,here. I've also looked at this question for a resolution, but as I'm using bracketed imports, this didn't really help me. I also tried following the guide here 但这也没有帮助。作为参考,我根据 npm list reactstrap
命令使用 reactstrap 8.4.1。我在这里做错了什么?
就我而言,这有效。
npm install --save reactstrap
npm audit fix --force
我正在尝试向网页添加页脚。它看起来像这样:
import React from 'react';
import { Row, Col, List, ListInlineItem } from 'reactstrap'
import { HashLink } from 'react-router-hash-link';
import { Link } from 'react-router-dom';
import logo from './../assets/logo.png'
export function Footer(props) {
return (
<div>
<hr />
<Row>
<Col xl="2" lg="2" className="d-none d-lg-block">
<img src={logo} className="img-side" alt="Loading..." />
</Col>
<Col xl="8" lg="8" md="12" sm="12" xs="12">
<center>
<small>
<p><a href="">Privacy Policy</a></p>
<List type="inline">
<ListInlineItem>
<Link to="/">Home</Link>
</ListInlineItem>
<ListInlineItem>
<HashLink to="/#product">Product</HashLink>
</ListInlineItem>
<ListInlineItem>
<Link to="/overview">Solution</Link>
</ListInlineItem>
<ListInlineItem>
<HashLink to="/#getintouch">Contact Us</HashLink>
</ListInlineItem>
</List>
<p><a href="">Subscribe to Newsletter</a></p>
</small>
</center>
</Col>
</Row>
</div>
);
}
当我尝试将此页面竖起时,出现以下错误:
Attempted import error: 'List' is not exported from 'reactstrap'.
我不确定是什么原因造成的,因为 List
记录在 Reactstrap 网站上,here. I've also looked at this question for a resolution, but as I'm using bracketed imports, this didn't really help me. I also tried following the guide here 但这也没有帮助。作为参考,我根据 npm list reactstrap
命令使用 reactstrap 8.4.1。我在这里做错了什么?
就我而言,这有效。
npm install --save reactstrap
npm audit fix --force