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
import React from 'react'; | |
import { StyleSheet, Text, View, TouchableOpacity, Dimensions } from 'react-native'; | |
const { width, height } = Dimensions.get('window'); | |
export default class extends React.Component { | |
render() { | |
return ( | |
<View style={styles.container}> | |
<TouchableOpacity | |
activeOpacity={0.9} |
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
// store.js | |
import {observable} from 'mobx'; | |
class CounterStore { | |
@observable counter = 0; | |
increment() { this.counter++; } | |
decrement() { this.counter--; } | |
} |
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
// store.js | |
class CounterStore { | |
... | |
setCounterAsync() { | |
fetch('/path/to/api') | |
.then((result) => this.counter = result) | |
.done(); | |
} | |
} |
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
[ | |
[ | |
{ | |
"surah": 1, | |
"verse": 1, | |
"translation": "د الله په نامه سره (شروع كوم) چې ډېر زیات مهربان، بې حده رحم كوونكى دى" | |
}, | |
{ | |
"surah": 1, | |
"verse": 2, |