ResourceItem
Resource items represent specific objects within a collection, such as products or orders. They provide contextual information on the resource type and link to the object’s detail page.
A ResourceItem
should be rendered within a ResourceList
.
optional = ?
Name | Type | Description |
---|---|---|
id | string |
Unique ID for the resource item. |
onPress | () => void |
Callback when the resource item is pressed. |
- 📱 All children of ResourceItems are placed in a single view object, which makes recycling the views expensive. Consider making your ResourceItems simple.
- 📱 Any child of ResourceItem that has an
onPress
will take precedence and theonPress
of ResourceItem will not be invoked
✅ Do | 🛑 Don't |
---|---|
📱 Keep ResourceItem shallow. Complex hierarchies have performance penalties | 📱 Use complex and deep Stack layouts |