Question is self explanatory. I'm using Tabs from Material-UI so that I can render different Grids depending on user's choice. Each panel should contain a Grid with various textfields and components. Problem is I get a warning saying:
Warning: validateDOMNesting(...): div cannot appear as a descendant of p.
Below is the code:
<Grid item md={10} xs={10} className={classes.divStyle}>
{categories.map((category, i) => (
<TabPanel value={value} index={i} key={`tabpanel-${i}`}>
<Grid p={3}>
</Grid>
</TabPanel>
))};
</Grid>
How could I solve it? Thanks in advance!