1- import React from 'react/addons'
1+ import React from 'react'
2+ import { render } from 'react-dom'
23import { createHistory , useBasename } from 'history'
34import { Router , Route , Link } from 'react-router'
45
@@ -9,8 +10,8 @@ const history = useBasename(createHistory)({
910} )
1011
1112class App extends React . Component {
12- static title = 'Home' ;
13- static path = '/' ;
13+ static title = 'Home'
14+ static path = '/'
1415
1516 render ( ) {
1617 const depth = this . props . routes . length
@@ -24,12 +25,12 @@ class App extends React.Component {
2425 </ ul >
2526 </ aside >
2627 < main >
27- < ul className = " breadcrumbs-list" >
28+ < ul className = ' breadcrumbs-list' >
2829 { this . props . routes . map ( ( item , index ) =>
2930 < li key = { index } >
3031 < Link
3132 onlyActiveOnIndex = { true }
32- activeClassName = " breadcrumb-active"
33+ activeClassName = ' breadcrumb-active'
3334 to = { item . path || '' } >
3435 { item . component . title }
3536 </ Link >
@@ -45,32 +46,32 @@ class App extends React.Component {
4546}
4647
4748class Products extends React . Component {
48- static title = 'Products' ;
49- static path = '/products' ;
49+ static title = 'Products'
50+ static path = '/products'
5051
5152 render ( ) {
5253 return (
53- < div className = " Page" >
54+ < div className = ' Page' >
5455 < h1 > Products</ h1 >
5556 </ div >
5657 )
5758 }
5859}
5960
6061class Orders extends React . Component {
61- static title = 'Orders' ;
62- static path = '/orders' ;
62+ static title = 'Orders'
63+ static path = '/orders'
6364
6465 render ( ) {
6566 return (
66- < div className = " Page" >
67+ < div className = ' Page' >
6768 < h1 > Orders</ h1 >
6869 </ div >
6970 )
7071 }
7172}
7273
73- React . render ( (
74+ render ( (
7475 < Router history = { history } >
7576 < Route path = { App . path } component = { App } >
7677 < Route path = { Products . path } component = { Products } />
0 commit comments