I'm trying to use the Chip component from material-ui.
It worked when I used it alone, but when I rendered it using a loop (map) I got this error :
Warning: Failed prop type: The property
childrenis not supported. Please remove it. in Chip (created by WithStyles(Chip))
here is an example of my render method :
render() {
const { classes, theme } = props;
return (
<div>
{['aa', 'bb', 'cc'].map((e, index) => <Chip key={index}>{e}</Chip>)}
</div>
);
}
From the official Material-ui docs about children:
This property isn't supported. Use the component property if you need to change the children structure.
However in my example I'm not using the child prop, what is wrong with my code ?
{e}</Chip> - {e} is a child - xadm