react-router-tutorial
react-router-tutorial copied to clipboard
Update Tutorials with 2.0.0 release changes
Should reflect something like this. Since NPM Modules have been separated:
import React from 'react';
import { Router, Route, useRouterHistory } from 'react-router';
import { createMemoryHistory } from 'history';
import { render } from 'react-dom';
import { App } from './App';
const appHistory = createMemoryHistory();
render(
(
<Router history={appHistory}>
<Route path="/" component={App}/>
</Router>
),
document.getElementById('root')
);