nishanbajracharya / react-virtualized-listview

A simple virtualized listview inspired by react-virtualized
https://2zo5k84lx0.codesandbox.io/
MIT License
46 stars 6 forks source link

Support render function pattern with `children` prop. #3

Open squgeim opened 6 years ago

squgeim commented 6 years ago

The render prop patterns has become quite popular in the React ecosystem and the most common way to do it with the children prop. The renderItem prop is doing exactly this. I believe supporting the children prop for compatibility with the ecosystem would be nice.

rabingaire commented 6 years ago

Instead of render props what do you think about Children Render Props, I personally find Children Render Props cleaner to write and expose as an API. I guess Children Render Props is what you meant to suggest here.