- AWS CLI configured or AWS Console access
- SSH key for the EC2 instance
- Instance ID from the alert
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
| import React from 'react' | |
| import ReactDOM from 'react-dom' | |
| import PropTypes from 'prop-types' | |
| // Instead of using a HOC, we can share code using a | |
| // regular component with a render prop! | |
| class Mouse extends React.Component { | |
| static propTypes = { | |
| render: PropTypes.func.isRequired | |
| } |
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
| import React, { Component } from 'react'; | |
| import PropTypes from 'prop-types'; | |
| import SelectDropdown, {CHECK_MARK} from './SelectDropdown'; | |
| /** | |
| * Uses render prop to reuse SelectDropdown functionalities | |
| * @author skh | |
| */ | |
| export default class CountryFilter 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
| import React, { Component } from 'react'; | |
| import PropTypes from 'prop-types'; | |
| import SelectDropdown, {CHECK_MARK} from './SelectDropdown'; | |
| /** | |
| * Uses render prop to reuse SelectDropdown functionalities | |
| * @author skh | |
| */ | |
| export default class CountryFilter 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
| import {withRouter} from 'react-router-dom'; | |
| class Trips extends React.Component { | |
| render() { | |
| const { location: { pathname } } = this.props | |
| return ( | |
| <h1>Hello people, currenty at: {pathname}</h1> | |
| ) | |
| } | |
| } |
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
| const GalleryItem = ({ url, alt, description, alt, author }) => ( | |
| <div className="img-container"> | |
| <img src={url} alt={alt} /> | |
| {description} - {author} | |
| </div> | |
| ); | |
| class Gallery extends Component { | |
| state = { | |
| isLoading: false, |
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
| const GalleryItem = ({ url, alt, description, alt, author }) => ( | |
| <div className="img-container"> | |
| <img src={url} alt={alt} /> | |
| {description} - {author} | |
| </div> | |
| ) |
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 Gallery extends Component { | |
| state = { | |
| isLoading: false, | |
| currentImage: 0, | |
| imgs: [], | |
| }; | |
| componentDidMount() { | |
| this.setState({ isLoading: true }); | |
| // AJAX API call here |