Warning: React does not recognize the `iconType` prop on a DOM element

28 Views Asked by At

I am developing a React application in TypeScript and I have used the Recharts library to represent charts. However, I encountered the following error:

Warning: React does not recognize the iconType prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase icontype instead. If you accidentally passed it from a parent component, remove it from the DOM element.

This is the recharts library in the component.

<Legend  
  iconType='line' 
  iconSize={4} 
  inactiveColor='black'  
  content={<div className="text-center">{legendName}</div>} 
  wrapperStyle={{ fontSize: '12px' }} 
/>

I need a way to integrate the recharts bundle into my React app without making any changes to the bundle itself.

0

There are 0 best solutions below