I hereby claim:
- I am ecavalcanti on github.
- I am ecavalcanti (https://keybase.io/ecavalcanti) on keybase.
- I have a public key ASCvUXoNw-rcJ8GFLmUk6jPmA7wdGxgzWA6V8bytwbW_BQo
To claim this, I am signing this object:
const net = require('net'); | |
const hostname = process.env.SERVER_HOSTNAME || '0.0.0.0'; | |
const port = process.env.SERVER_PORT || 8124; | |
const interval = process.env.INTERVAL || 1000; | |
const plates = process.env.PLATES ? process.env.PLATES.split(',') : undefined; | |
const sockets = []; | |
const server = net.createServer((socket) => { |
I hereby claim:
To claim this, I am signing this object:
_onItemPress = (item) => { | |
this.props.navigation.navigate('Description', {hero: item}) | |
} |
import { TouchableOpacity, View, FlatList, Text, Image } from 'react-native' | |
... | |
_renderItem = ({item}) => { | |
return ( | |
<TouchableOpacity onPress={()=>this._onItemPress(item)} style={{flexDirection:'row', padding: 10, alignItems:'center'}}> | |
<Image style={{height: 50, width: 50, borderRadius: 25}} source={{uri: `${item.thumbnail.path}.${item.thumbnail.extension}` }} /> | |
<Text style={{marginLeft: 10}}>{item.name}</Text> | |
</TouchableOpacity> |
import React, { Component } from 'react' | |
import { ScrollView, Image, Dimensions, Text } from 'react-native' | |
const SCREEN_WIDTH = Dimensions.get('screen').width | |
export default class Description extends Component { | |
static navigationOptions = { | |
title: 'Description' | |
} |
import React from 'react' | |
import { StatusBar, Platform } from 'react-native' | |
import Home from './src/screens/Home' | |
import Description from './src/screens/Description' | |
import { StackNavigator } from 'react-navigation' | |
const App = StackNavigator({ | |
Home: { | |
screen: Home | |
}, |
import React from 'react' | |
import { TouchableOpacity, View, FlatList, Text, Image } from 'react-native' | |
import md5 from 'js-md5' | |
const PUBLIC_KEY = 'SUA_PUBLIC_KEY' | |
const PRIVATE_KEY = 'SUA_PRIVATE_KEY' | |
export default class Home extends React.PureComponent { | |
static navigationOptions = { | |
title: 'Heroes' |
import React, { Component } from 'react' | |
import { AppRegistry, View, Text, TextInput, StyleSheet, TouchableOpacity, ActivityIndicator } from 'react-native' | |
export default class App extends Component { | |
state = { | |
loading: false | |
} | |
renderLoading() { | |
if (this.state.loading) { |