I want to try stateless component in react, I split them into 2, but I got error of Warning: Unknown props
itemson <renderItems> tag
What's wrong with my code below?
import Items from './Items'
import Infinite from 'react-infinite'
const LeftPanel = (props) => {
return(
<div className="leftPanel">
<renderItems {...props} />
</div>
)
}
const renderItems = (props) => (
<Infinite containerHeight={200} elementHeight={118}>
{map(props.items, (item, index) => (
<Items
index={index}
item={item}
/>
))}
</Infinite>
)
export default LeftPanel