This file contains 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
function Counter () { | |
const [numClicks, setNumClicks] = useState(0); | |
return ( | |
<div> | |
<p>You have clicked {numClicks} times!</> | |
<button onClick={() => setNumClicks(numClicks+1)> | |
Click Me | |
</button> | |
</div> | |
) |
This file contains 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
function App() { | |
const userName = "Some Name"; | |
return ( | |
<div> | |
<WelcomeMessage userName={userName}/> | |
<ReactButton/> | |
</div> | |
) | |
} |
This file contains 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
function WelcomeMessage(props) { | |
return ( | |
<div> | |
<p>Welcome {props.userName}!</p> | |
<p>It's nice to see you here!</p> | |
</div> | |
) | |
} |
This file contains 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
function App() { | |
const userName = 'Some Name'; | |
return ( | |
<div> | |
<p>Hello {userName}!</p> | |
<ReactButton/> | |
</div> | |
) | |
} |
This file contains 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
function ReactButton() { | |
const link = 'https://reactjs.org'; | |
return ( | |
<div> | |
<a href={link} target="_blank" rel="noopener noreferrer"> | |
Go To React | |
</a> | |
</div> | |
) | |
} |
This file contains 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
function App() { | |
const userName = 'Some Name'; | |
return ( | |
<div> | |
<p>Hello {userName}!</p> | |
</div> | |
) | |
} |
This file contains 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
function App() { | |
return ( | |
<div> | |
<p>Hello World!</p> | |
</div> | |
) | |
} |
This file contains 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
// create channel first on android | |
// create notification | |
let notification = new firebase.notifications.Notification() | |
.setTitle("My reminder") | |
.setBody("My reminder text") | |
.setData({ | |
type: "reminder", | |
}) | |
.android.setChannelId(channel.channelId); |
This file contains 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
// @flow | |
'use strict'; | |
import React, {Component} from 'react'; | |
import { | |
StyleSheet, | |
Text, | |
View, | |
Platform, | |
FlatList, | |
Animated, |
NewerOlder