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
Show hidden characters
{ | |
"compilerOptions": { | |
"experimentalDecorators": true, | |
"allowJs": true | |
} | |
} |
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 mobx, { observable, action, computed } from "mobx"; | |
class Store { | |
@observable todos=[]; | |
@observable selectedStatus="all"; | |
@action('adding todo item') | |
addTodo(todo){ | |
this.todos.push({ | |
id: this.todos[this.todos.length - 1].id +1, | |
status: false, | |
text: todo |
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 mobx, { observable, action } from "mobx"; | |
class Store { | |
@observable todos=[]; | |
@observable selectedStatus="all"; | |
@action('adding todo item') | |
addTodo(todo){ | |
this.todos.push({ | |
id: this.todos[this.todos.length - 1].id +1, | |
status: false, | |
text: todo |
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 mobx, { observable } from "mobx"; | |
class Store { | |
@observable todos=[]; | |
@observable selectedStatus="all"; | |
} | |
const todoStore = new Store() | |
export default todoStore; |
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 liraries | |
import React, { Component } from "react"; | |
import { View, Text, StyleSheet, ScrollView,LayoutAnimation, StatusBar } from "react-native"; | |
import FlexTab from "./flexTab"; | |
import Header from './header' | |
// create a component | |
class App extends Component { | |
constructor() { | |
super(); | |
this.state = { |
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 liraries | |
import React, { Component } from "react"; | |
import { View, Text, ListView, StyleSheet } from "react-native"; | |
const rows = [ | |
{ id: 1, text: "row1" }, | |
{ id: 2, text: "row2" }, | |
{ id: 3, text: "row3" }, | |
{ id: 4, text: "row4" }, | |
{ id: 5, text: "row5" }, |
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
#user nobody; | |
worker_processes 1; | |
#error_log logs/error.log; | |
#error_log logs/error.log notice; | |
#error_log logs/error.log info; | |
#pid logs/nginx.pid; |
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
'use strict'; | |
import React, { Component } from 'react'; | |
import { StyleSheet,View, Text,TouchableOpacity, | |
TextInput, Platform } from 'react-native'; | |
class Main extends Component { | |
render() { | |
return ( |
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
Trying to Save Callbacks | |
analytics.trackPurchase(purchaseData,function(){ | |
tracked=true; | |
chargeCreditCard(); | |
displayThankyouPage(); | |
} | |
); |
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
React Native Quick Notes | |
----------------------------------------- | |
<View onLayout={this._handleLayout} /> | |
------------------------------------------------------------ | |
onLayout { nativeEvent : { layout: {x, y, width, height} } } | |
-This event is fired immediately once the layout has been calculated | |
-But the new layout may not yet be reflected on the screen at the same time the event is received | |
(Especially if a layout animation is in progress) | |