Should the prop 'renderItem' of List component be optional in TypeScript interface, or the example code in the Document has a bug? #16587
Steps to reproduce
Use a List component in a react app, without renderItem prop
What is expected?
‘renderItem’ is required in the interface ListProps. As the react-virtualized example in the document of List component shown, 'renderItem' is not used and there should not be any type error.
What is actually happening?
Actually in TypeScript environment, the 'prop' renderItem is required and if I copy the example code to my project, it will raise an TypeScript error:
Although I use firstname.lastname@example.org, the definition of renderItem is still not optional in the latest version of code.
The text was updated successfully, but these errors were encountered: