Created
November 12, 2018 16:14
-
-
Save thiagoferreiraw/9f19099f14e4eb94adfd8cf675943067 to your computer and use it in GitHub Desktop.
Home.js
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
import React from 'react'; | |
import PropTypes from "prop-types" | |
const Home = ({ username, tasks }) => ( | |
<div> | |
<p>Welcome, {username}!</p> | |
<ul> | |
{tasks && tasks.map((t, idx) => <li key={idx}>{t}</li>)} | |
</ul> | |
</div> | |
) | |
Home.propTypes = { | |
username: PropTypes.string, | |
tasks: PropTypes.array | |
} | |
export default Home |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment