Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Function
- const getThingName = (allCategories, id) => {
- const categoryName = _.find(allCategories, {items: [{id}]}).name;
- return categoryName;
- }
- //Component
- const ThingsListView = ({ allCategories, .... }) => {
- console.log(JSON.stringify(allCategories))
- return (
- <ScrollView>
- <View>
- ...
- {(thingsByUser &&
- thingsByUser.length && (
- <List>
- {thingsByUser.map(({ id }, idx) => (
- ...
- <CardText>{getThingName(allCategories, id)}</CardText>
Add Comment
Please, Sign In to add comment