react-router-tutorial icon indicating copy to clipboard operation
react-router-tutorial copied to clipboard

Update Tutorials with 2.0.0 release changes

Open ChrisCates opened this issue 7 years ago • 0 comments

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')
);

ChrisCates avatar Apr 13 '17 03:04 ChrisCates