Last active
July 30, 2019 11:24
-
-
Save mimol91/62ab326efb06408940f85421c9509f23 to your computer and use it in GitHub Desktop.
resp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data = { | |
"state":{ | |
"counter":2 | |
}, | |
"bindings": { | |
onClickButton : ({navigation}, setState) => () => { | |
setState((state) => ({counter: state.counter + 1})) | |
//setState({counter: 5}) | |
setTimeout(()=>{ | |
navigation.navigate('Home') | |
}, 1000) | |
} | |
}, | |
"components": {Button, View, Text}, | |
"jsx": '<View><Button title="Learn More" onPress={onClickButton(props,setState)}/><Text>{state.counter}</Text></View>' | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Text>ABC</Text> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Tx>abc</Tx> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment