P E N C I L
Login
React router v4
  1. import {Link, withRouter} from 'react-router-dom';
  2. Access to history, location, match object
    1. https://codepen.io/greensuisse/pen/xLxKEr
    2. https://reacttraining.com/react-router/web/api/history
      (Search The router will provide you with a location object in a few place)
    3. History, location, match is in the this.props.history/location/match if component is direct a Router component.
      If component is a children of a router component or it's not a children of any router component (ex: direct child of HashBrowser).
      Then we need withBrowser
      1. import {withRouter} from 'react-router-dom';
        export default withRouter(component)
        Then history, location and match will be available in this.props
  3. Params  
    1. Available in props.match, but if component is not a direct router component, component needed to be wrapped by withRouter
    2. Example:
      1. this.props.match.params.eventId;  
      2. this.props.match.url
  4. History
    1. this.props.history.push('/mypaht/myparam);