我正在使用带有服务器端分页过滤和排序的react-data-table组件,一切都很好,但我收到了这些警告,我无法理解如何解决,我寻找了一个解决方案,但我只找到了关于在函数外声明样式组件的答案,但问题是使用样式组件的不是我,而是使用它的react-data-table。以下是我收到的警告:
Keyframes.js:20 The component styled.div with the id of "sc-bdnxRM" has been created dynamically. You may see this warning because you've called styled inside another component. To resolve this only create new StyledComponents outside of any render method and function component. Pe @
Keyframes.js:20 Keyframes.js:20 The component styled.div with the id of "sc-gtsrHT" has been created dynamically. You may see this warning because you've called styled inside another component. To resolve this only create new StyledComponents outside of any render method and function component. Pe
@ Keyframes.js:20 Keyframes.js:20 The component styled.div with the id of "sc-dlnjwi" has been created dynamically. You may see this warning because you've called styled inside another component. To resolve this only create new StyledComponents outside of any render method and function component. Pe
@ Keyframes.js:20 Keyframes.js:20 The component styled.div with the id of "sc-hKFxyN" has been created dynamically. You may see this warning because you've called styled inside another component. To resolve this only create new StyledComponents outside of any render method and function component. Pe @ Keyframes.js:20 Keyframes.js:20 The component Styled(styled.div) with the id of "sc-eCApnc" has been created dynamically. You may see this warning because you've called styled inside another component. To resolve this only create new StyledComponents outside of any render method and function component.我对react和react-data-table是个新手。
发布于 2021-10-07 07:44:26
我通过添加导入"react-data-table- component“解决了这个问题;在App.js中,在这之前我只从我创建的组件中的”react-data-table-component“调用数据表,似乎我也必须在app.js中导入它
https://stackoverflow.com/questions/68206889
复制相似问题