import React from "react" import ReactDOM from "react-dom" import createHistory from 'history/createBrowserHistory'; const history = createHistory(); import Navigation from "./components/Navigation" import Discover from "./components/Discover" class App extends React.Component { constructor(props) { super(props) this.navigate = this.navigate.bind(this); this.state = { location: history.location } } render() { return (
) } navigate(location) { console.log(location); history.push(location); this.setState({location: location}) } } ReactDOM.render(, document.getElementById("wrapper"));