Morning:
Afternoon:
create-react-app
map
with componentsmap
with ComponentsPerson.js
class Person extends React.Component {
render() {
return (
<li>Hello, {this.props.person.name}!</li>
)
}
}
export default Person
PersonList.js
import Person from './Person'
class PersonList extends React.Component {
render() {
const people = [
{ name: 'Dana', hair: 'blonde' },
{ name: 'Nichole', hair: 'long' },
{ name: 'Davey', hair: 'long gone' }
]
return (
<div>
<h2>People</h2>
{
people.map((person => <Person person={person} />))
}
</div>
)
}
}
export default PersonList
map
with keys
chat-static
content. There should be approximately one CSS file per component.SignIn
component with a form that takes a user name or email.state
of the App
component.state.user
is not set, show the SignIn
component.state.user
is set, show the Main
component.Hint: You need to figure out how to do conditional rendering.