This file contains hidden or 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
| // App.js | |
| import React, { Component } from 'react'; | |
| import './App.css'; | |
| import Counter from './components/Counter' | |
| class App extends Component { |
This file contains hidden or 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
| class Clock extends React.Component { | |
| constructor(props) { | |
| super(props); | |
| this.state = { | |
| year: props.year | |
| }; | |
| console.log('IN CONSTRUCTOR'); | |
| }; |
This file contains hidden or 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
| class Clock extends React.Component { | |
| constructor(props) { | |
| super(props); | |
| this.state = { | |
| year: props.year | |
| }; | |
| console.log('IN CONSTRUCTOR'); | |
| }; |
This file contains hidden or 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
| // src/App.js | |
| import React, { Component } from 'react'; | |
| import User from './components/User'; | |
| // App.js | |
| class App extends Component { | |
| state = { | |
| userA: { | |
| firstName: "Harper", | |
| avatarUrl: "https://www.refreshmiami.com/wp-content/uploads/2018/07/55085_logo-ironhack.png" |
For the following exercise you can use ES5 or ES6 syntax, whichever you feel more comfortable with at this point.
Go ahead to Repl.it , using the code below as your starting point.

