-1
I need to use the same button on different pages and with different functions
How can I pass the function to the button ?
class App extends Component {
render(){
return(
<View>
<Button title="Abrir conta" />
</View>
)
}
}
const Button = (props) => (
<View>
<TouchableOpacity onPress={() => {}}>
<Text>{props.title}</Text>
</TouchableOpacity>
</View>
)
Your question is a little vague. Could you edit it by adding a little more detail, please? :)
– Luiz Felipe