javascript - 使用 react-button 给出未知道具的警告
问题描述
在 package.json 的依赖项中,我有:
"react": "15.6.1",
"react-dom": "15.6.1",
"react-button": "1.2.1"
当我简单地导入按钮时
import Button from 'react-button'
然后将其用作:
<Button>Hello</Button>
这给了我以下警告:
Warning: Unknown props `isReactButton`, `applyDefaultTheme`, `buttonStates`, `align`, `defaultStyle`, `defaultDisabledStyle`, `defaultLabelStyle`, `ellipsisLabelStyle`, `ellipsis`, `themes`, `theme`, `active`, `over`, `focused` on <a> tag. Remove these props from the element.
显然,这些道具都不是我提供的,所以我认为它可能与依赖项的版本有关。
我怎样才能解决这个问题?
解决方案
推荐阅读
- c++ - QOpenGLContext 和原生 OpenGL 上下文之间的纹理共享不适用于 Mesa 驱动程序
- android - 终端上的 Gradle 版本与 Project Gradle 版本不同
- javascript - 如何创建布尔类型的 Observable?
- spring - Spring Cloud Gateway 同时监听 HTTP 和 HTTPS?
- javascript - 纱线升级以修复纱线审计错误
- javascript - 定义一个包含变量,然后立即覆盖它
- excel - Excel 2010 - 将数据从一张工作表复制到另一张工作表,如果找不到则显示错误消息
- html - XPath 地址不够详细
- c# - 在 .net 核心应用程序启动中使用 MapWhen 和 ApplicationBuilder 的组合?
- css - 如何在chrome自动完成上删除蓝色背景