Creating multiple components that mostly share the same properties.
In our application, we often create similar components.
A good example would be rendering "food items" in a FlatListarrow-up-right
FlatList
Each "food item" is a component, with the following information:
title
calories
To achieve this, we created a component titled FoodItem, which is repeatedly used by the FlatList to create new components on the user's screen.
FoodItem
We made use of this design pattern in other parts of our application, and have collated a collection of such components in this folderarrow-up-right.
Last updated 4 years ago