File tree Expand file tree Collapse file tree 4 files changed +8
-7
lines changed Expand file tree Collapse file tree 4 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -17,8 +17,8 @@ class App extends Component {
17
17
18
18
handleChange ( nextValue ) {
19
19
// Available thanks to contextTypes below
20
- const { router } = this . context ;
21
- router . transitionTo ( `/${ nextValue } ` ) ;
20
+ const { history } = this . context ;
21
+ history . pushState ( null , `/${ nextValue } ` ) ;
22
22
}
23
23
24
24
renderErrorMessage ( ) {
@@ -71,7 +71,7 @@ App.propTypes = {
71
71
} ;
72
72
73
73
App . contextTypes = {
74
- router : PropTypes . object . isRequired
74
+ history : PropTypes . object . isRequired
75
75
} ;
76
76
77
77
function mapStateToProps ( state ) {
Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ RepoPage.propTypes = {
65
65
repo : PropTypes . object ,
66
66
fullName : PropTypes . string . isRequired ,
67
67
name : PropTypes . string . isRequired ,
68
- owner : PropTypes . string . isRequired ,
68
+ owner : PropTypes . object . isRequired ,
69
69
stargazers : PropTypes . array . isRequired ,
70
70
stargazersPagination : PropTypes . object ,
71
71
loadRepo : PropTypes . func . isRequired ,
Original file line number Diff line number Diff line change 1
1
import 'babel-core/polyfill' ;
2
2
import React from 'react' ;
3
- import BrowserHistory from 'react-router /lib/BrowserHistory ' ;
3
+ import createBrowserHistory from 'history /lib/createBrowserHistory ' ;
4
4
import { Provider } from 'react-redux' ;
5
5
import { Router , Route } from 'react-router' ;
6
6
import configureStore from './store/configureStore' ;
7
7
import App from './containers/App' ;
8
8
import UserPage from './containers/UserPage' ;
9
9
import RepoPage from './containers/RepoPage' ;
10
10
11
- const history = new BrowserHistory ( ) ;
11
+ const history = createBrowserHistory ( ) ;
12
12
const store = configureStore ( ) ;
13
13
14
14
React . render (
Original file line number Diff line number Diff line change 15
15
},
16
16
"homepage" : " http://rackt.github.io/redux" ,
17
17
"dependencies" : {
18
+ "history" : " ^1.9.0" ,
18
19
"humps" : " ^0.6.0" ,
19
20
"isomorphic-fetch" : " ^2.1.1" ,
20
21
"lodash" : " ^3.10.1" ,
21
22
"normalizr" : " ^1.0.0" ,
22
23
"react" : " ^0.13.3" ,
23
24
"react-redux" : " ^2.1.2" ,
24
- "react-router" : " 1.0.0-beta3 " ,
25
+ "react-router" : " ^ 1.0.0-rc1 " ,
25
26
"redux" : " ^3.0.0" ,
26
27
"redux-logger" : " 0.0.1" ,
27
28
"redux-thunk" : " ^0.1.0"
You can’t perform that action at this time.
0 commit comments