React createElement – Warning: Unknown prop `childItems` on
tag. Remove this prop from the element

The following command creates an element in React.

    const el = React.createElement(
                 < an html tag or react component >, 
                 < attributes or props or {} >, 
                 < children elements or text >

When you pass a non html standard attributes in the second parameter to create html tag like div or p tag then a warning is raised of unknown prop. Simply remove the non standard attribute from the second parameter or pass empty object {}.

Leave a Comment

Your email address will not be published. Required fields are marked *