首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >reactstrap中缺少的列表

reactstrap中缺少的列表
EN

Stack Overflow用户
提问于 2021-03-20 12:06:00
回答 1查看 158关注 0票数 0

我正在尝试为网页添加页脚。它看起来是这样的:

代码语言:javascript
复制
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>
  );
}

当我试图竖起这个页面时,我得到了以下错误:

代码语言:javascript
复制
Attempted import error: 'List' is not exported from 'reactstrap'.

我不确定是什么导致了这个问题,因为Reactstrap网站here上有List的文档。我也曾考虑过this question的解决方案,但由于我使用的是带括号的导入,这对我并没有真正的帮助。我也试着遵循here指南,但也没有帮助。作为参考,我根据npm list reactstrap命令使用reactstrap 8.4.1。我在这里做错了什么?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2021-03-20 12:36:39

在我的例子中,这是可行的。

代码语言:javascript
复制
npm install --save reactstrap
npm audit fix --force
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/66718139

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档