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 from "react"; | |
import { asyncComponent } from "@jaredpalmer/after"; | |
export default [ | |
{ | |
path: "/", | |
exact: true, | |
component: asyncComponent({ | |
loader: () => import("./Home"), // required |
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 { exec } = require("child_process"); | |
exec("node teste.js", (error, stdout, stderr) => { | |
if (error) { | |
console.error(`exec error: ${error}`); | |
return; | |
} | |
console.log(`stdout: ${stdout}`); | |
console.log(`stderr: ${stderr}`); | |
}); |
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 ViewContainer = ({children, style}) => | |
Platform.OS == "ios" ? <Keyboard style={style} behavior="padding">{children}</Keyboard> : | |
<Keyboard style={style} behavior="position">{children}</Keyboard> | |
<ViewContainer> | |
<View> </View> | |
</ViewContainer> |
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
export default class App extends Component { | |
state = { | |
data: data | |
} | |
renderItem = ({item}) => { | |
return (<View> | |
<Image source={{uri: item.avatar}} style={styles.itemImage} /> | |
</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, StyleSheet, Dimensions, FlatList, Image } from 'react-native'; | |
import data from './data' | |
let {width} = Dimensions.get('window') | |
let numberGrid = 3 | |
let itemWidth = width / numberGrid |
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
export default [{ | |
id: 1, | |
first_name: "George", | |
last_name: "Bluth", | |
avatar: "https://s3.amazonaws.com/uifaces/faces/twitter/calebogden/128.jpg" | |
}, | |
{ | |
id: 2, | |
first_name: "Janet", | |
last_name: "Weaver", |
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 styles = StyleSheet.create({ | |
container: { | |
flex: 1, | |
}, | |
itemImage:{ | |
width: itemWidth, | |
height: itemWidth | |
} | |
}); |
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 Settings = StackNavigator({ | |
Notification: {screen: NotificationScreen}, | |
SocialMedia: {screen: SocialMediaScreen} | |
}) | |
export default StackNavigator({ | |
Home: {screen: HomeScreen}, | |
Settings: {screen: Settings} | |
}) |
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 App extends Component { | |
constructor(){ | |
this.state = {loading: true} | |
} | |
componentWillMount(){ | |
FCMToken(token){ | |
this.setState({token: token, loading: false}) | |
} | |
} | |
render(){ |
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 Content = ({ content, handleVote}) => ( | |
<Container> | |
<Info> | |
<Thumb | |
style={{ | |
backgroundImage: `url(${changeImage.imageFromContent( | |
content.img_130 | |
)})` | |
}} | |
/> |