Last active
November 27, 2017 14:13
-
-
Save norbajunior/8f612668e87ff5014a6ae45488ef9d20 to your computer and use it in GitHub Desktop.
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, Button } from 'react-native' | |
const newNotifications = [ | |
{ | |
id: 1, | |
message: "I'm here to bother you. Don't ignore me!", | |
avatar: require('./images/3cpo.jpg') | |
}, | |
{ | |
id: 2, | |
message: "Luke, I'm your father 😬", | |
avatar: require('./images/darth.jpeg') | |
}, | |
{ | |
id: 3, | |
message: "Morning. May the Force be with you!", | |
avatar: require('./images/leia.jpg') | |
}, | |
{ | |
id: 4, | |
message: "Oi sumido 😎", | |
avatar: require('./images/rey.jpg') | |
} | |
] | |
class App extends Component { | |
state = { notifications: [] } | |
render () { | |
<View> | |
<TopBarNotification {...this.state} /> | |
<Button | |
onPress={() => this.setState({ notifications: newNotifications )} | |
title="Receive Notifications" | |
/> | |
</View> | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment