Closed SABRYX closed 6 years ago
@SABRYX
Add an .onPress to all of your brick objects ({ onPress: () => navigate('item1') }). Here's a way to dynamically do this using .map
.
const addOnPress = (item) => {
item.onPress = () => this.props.navigate(item.data.name)
};
const data = [
{data: {name: 'page 1'}, uri: '...'},
{data: {name: 'page 2', uri: '...'},
{data: {name: 'page 3', uri: '...'}
].map(addOnPress);
@brh55 thanks for the response i'll try it
Expected Behavior
Current Behavior
Possible Solution
Steps to Reproduce
Context (Environment)
Detailed Description
Possible Implementation