Implemented react-router v4 to ReactRedux template

This commit is contained in:
Keven van Zuijlen
2017-04-12 21:28:23 +02:00
committed by Steve Sanderson
parent c791ceee49
commit 785e7d48a2
9 changed files with 67 additions and 69 deletions

View File

@@ -1,5 +1,5 @@
import * as React from 'react';
import { Link } from 'react-router';
import { NavLink, Link } from 'react-router-dom';
export class NavMenu extends React.Component<{}, {}> {
public render() {
@@ -18,19 +18,19 @@ export class NavMenu extends React.Component<{}, {}> {
<div className='navbar-collapse collapse'>
<ul className='nav navbar-nav'>
<li>
<Link to={ '/' } activeClassName='active'>
<NavLink exact to={ '/' } activeClassName='active'>
<span className='glyphicon glyphicon-home'></span> Home
</Link>
</NavLink>
</li>
<li>
<Link to={ '/counter' } activeClassName='active'>
<NavLink to={ '/counter' } activeClassName='active'>
<span className='glyphicon glyphicon-education'></span> Counter
</Link>
</NavLink>
</li>
<li>
<Link to={ '/fetchdata' } activeClassName='active'>
<NavLink to={ '/fetchdata' } activeClassName='active'>
<span className='glyphicon glyphicon-th-list'></span> Fetch data
</Link>
</NavLink>
</li>
</ul>
</div>