This file contains hidden or 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, { Component } from 'react' | |
import { View, Image, StyleSheet, ScrollView, Text, Animated, StatusBar } from 'react-native' | |
import Icon from 'react-native-vector-icons/MaterialIcons' | |
const IMG_SRC = { uri: "https://pulsations.files.wordpress.com/2010/05/randomdog.jpg" } | |
const IMG_HEIGHT = 200 | |
const NAVBAR_HEIGHT = 64 | |
class Twitter extends Component { | |
constructor(props) { |
This file contains hidden or 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, { Component } from 'react' | |
import { View, Image, StyleSheet, ScrollView, Text, Animated, StatusBar, PixelRatio } from 'react-native' | |
import Icon from 'react-native-vector-icons/MaterialIcons'; | |
import MapView from 'react-native-maps'; | |
const AMSTERDAM = { | |
latitude: 52.3702, | |
longitude: 4.8952, | |
latitudeDelta: 0.0922, | |
longitudeDelta: 0.0421, |
This file contains hidden or 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, { Component } from 'react' | |
import { Image, StyleSheet, Text, View, ViewPagerAndroid, StatusBar, DrawerLayoutAndroid, TouchableNativeFeedback } from 'react-native' | |
import Icon from 'react-native-vector-icons/MaterialIcons' | |
const MaterialContainer = ({text}) => { | |
const elements = [] | |
for (let i = 0; i < 15; i++) { | |
elements.push(<Text id={i} style={[styles.materialText, { fontSize: 30 - i * 2 }]}>{text}</Text>) | |
} | |
return <View style={styles.materialContainer}>{elements}</View> |
This file contains hidden or 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, { Component } from 'react' | |
import { Image, StyleSheet, Text, View, ViewPagerAndroid, StatusBar, DrawerLayoutAndroid, TouchableNativeFeedback } from 'react-native' | |
import Icon from 'react-native-vector-icons/MaterialIcons' | |
const MaterialContainer = ({text}) => { | |
const elements = [] | |
for (let i = 0; i < 15; i++) { | |
elements.push(<Text id={i} style={[styles.materialText, { fontSize: 30 - i * 2 }]}>{text}</Text>) | |
} | |
return <View style={styles.materialContainer}>{elements}</View> |
This file contains hidden or 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, { Component } from 'react' | |
import { View, Image, StyleSheet, ScrollView, Text, Animated, StatusBar, PanResponder } from 'react-native' | |
import Icon from 'react-native-vector-icons/MaterialIcons' | |
const CIRCLE_SIZE = 80 | |
const IMG_SRC = { uri: "https://pulsations.files.wordpress.com/2010/05/randomdog.jpg" } | |
class PanExample extends Component { |
This file contains hidden or 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, { Component } from 'react'; | |
import { StyleSheet, View } from 'react-native'; | |
import { PanGestureHandler, State } from 'react-native-gesture-handler'; | |
import Animated from 'react-native-reanimated'; | |
class Snappable extends Component { | |
constructor(props) { | |
super(props); |
This file contains hidden or 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
class Composer extends Component { | |
state = { showAccessory: false } | |
componentDidMount() { | |
Keyboard.addListener('keyboardDidShow', () => this.setState({ showAccessory: true })); | |
Keyboard.addListener('keyboardDidHide', () => this.setState({ showAccessory: false })); | |
} | |
render() { | |
return ( | |
<View> |
This file contains hidden or 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
class Composer extends Component { | |
state = { showAccessory: false }; | |
componentDidMount() { | |
this.keyboardDidShowListener = Keyboard.addListener('keyboardDidShow', () => | |
this.setState({ showAccessory: true }) | |
); | |
this.keyboardDidHideListener = Keyboard.addListener('keyboardDidHide', () => | |
this.setState({ showAccessory: false }) | |
); |
This file contains hidden or 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
const userID = 'foo'; | |
const filterMyTodos = (todo) => { | |
return item.authorID == userID; | |
} | |
const myTodos = todos.filter(filterMyTodos) |
This file contains hidden or 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
let currenUser = { id: 123, name: 'Rob Stark' }; | |
const filterMyTodos = (todo) => { | |
return item.authorID == currenUser.id; | |
} | |
const myTodos = todos.filter(filterMyTodos) |