在 react 中 使用 styled-components 库来进行传参的时候报错,目前的问题可能是版本问题
This is a breaking change from a dependency of react-data-table-component, styled-components version 6
这是对 react-data-table-component、styled-components 版本 6 的依赖项的重大更改
The react-data-table-component library will need to be updated to properly use styled-components 6. For now, I solved this by downgrading styled-components to version 5:
需要更新 react-data-table-component 库才能正确使用 styled-components 6。现在,我通过将 styled-components 降级到版本 5 来解决这个问题
npm install styled-components@5
参考地址
styled component error “it looks like an unknown prop “responsive” is sent through to the DOM, which will likely trigger a React console error.”
v6: using styled(Component) results in looks like an unknown prop is being sent through to the DOM