Skip to content

Instantly share code, notes, and snippets.

@norbajunior
Last active November 27, 2017 14:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save norbajunior/8f612668e87ff5014a6ae45488ef9d20 to your computer and use it in GitHub Desktop.
Save norbajunior/8f612668e87ff5014a6ae45488ef9d20 to your computer and use it in GitHub Desktop.
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