From a87c3fcaafc8c839ae1263f84502634ef61081ec Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Thu, 15 Mar 2018 16:12:24 +0300 Subject: switch to react-router --- vnext/src/app.js | 51 ++++++++++++++++++++++++-------------- vnext/src/components/Navigation.js | 42 ------------------------------- 2 files changed, 32 insertions(+), 61 deletions(-) delete mode 100644 vnext/src/components/Navigation.js (limited to 'vnext/src') diff --git a/vnext/src/app.js b/vnext/src/app.js index 1991a14d0..82209e45b 100644 --- a/vnext/src/app.js +++ b/vnext/src/app.js @@ -1,37 +1,50 @@ import React from "react" import ReactDOM from "react-dom" -import createHistory from 'history/createBrowserHistory'; -const history = createHistory(); +import { BrowserRouter as Router, Route, Link } from "react-router-dom" -import Navigation from "./components/Navigation" import Discover from "./components/Discover" import Post from "./components/Post" class App extends React.Component { constructor(props) { - super(props) - this.navigate = this.navigate.bind(this); + super(props); this.state = { - location: history.location + visitor: { uid: 0 } } } render() { return ( -