I am using react-data-table-components and just following the instruction given by the documentation, but it's showing me an error (some of it is in text below):
Below is the sample code I copied in the documentation:
import DataTable from 'react-data-table-component';
const App = () => {
const columns = [
{
name: 'Title',
selector: row => row.title,
},
{
name: 'Year',
selector: row => row.year,
},
];
const data = [
{
id: 1,
title: 'Beetlejuice',
year: '1988',
},
{
id: 2,
title: 'Ghostbusters',
year: '1984',
},
]
return (
<>
<DataTable
columns={columns}
data={data}
/>
</>
)
}
export default App
Below is the package.json file:
These are the errors showing in my console:
StyledComponent.ts:159 styled-components: it looks like an unknown prop "responsive" is being sent through to the DOM, which will likely trigger a React console error. If you would like automatic filtering of unknown props, you can opt-into that behavior via
<StyleSheetManager shouldForwardProp={...}>(connect an API like@emotion/is-prop-valid) or consider using transient props ($prefix for automatic filtering.)react-dom.development.js:86 Warning: React does not recognize the
sortActiveprop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercasesortactiveinstead. If you accidentally passed it from a parent component, remove it from the DOM element.react-dom.development.js:86 Warning: Received
falsefor a non-boolean attributedense.react-dom.development.js:86 Warning: React does not recognize the
fixedHeaderprop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercasefixedheaderinstead. If you accidentally passed it from a parent component, remove it from the DOM element.
I fixed the issue by downgrading my version of
styled-componentsto v5.3.3, as @aldwinp35 commented: