Skip to content

Instantly share code, notes, and snippets.

@thiagoferreiraw
Created November 12, 2018 16:14
Show Gist options
  • Save thiagoferreiraw/9f19099f14e4eb94adfd8cf675943067 to your computer and use it in GitHub Desktop.
Save thiagoferreiraw/9f19099f14e4eb94adfd8cf675943067 to your computer and use it in GitHub Desktop.
Home.js
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