Skip to content
This repository was archived by the owner on Oct 26, 2018. It is now read-only.

Commit 8691686

Browse files
committed
fix conflicts from merging master
2 parents 0ffb094 + 5baf08f commit 8691686

File tree

2 files changed

+8
-10
lines changed

2 files changed

+8
-10
lines changed

CHANGELOG.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

2-
## 2.0.3
3-
2+
## [2.0.3](https://github.com/jlongster/redux-simple-router/compare/2.0.2...2.0.3)
3+
44
This version is just 2.0.2 re-published with a more recent version of npm to fix an issue where the `history` module was being published with the tarball. See [#133](https://github.com/rackt/redux-simple-router/issues/133).
55

66
## [2.0.2](https://github.com/jlongster/redux-simple-router/compare/1.0.2...2.0.2)
@@ -15,6 +15,8 @@ Versions 2.0.0 and 2.0.1 were test releases for the 2.* series. 2.0.2 is the fir
1515
* `UPDATE_PATH` is now `UPDATE_LOCATION`.
1616
* The fully parsed [location object](https://github.com/rackt/history/blob/master/docs/Location.md) is now stored in the state instead of a URL string. To access the path, use `state.routing.location.pathname` instead of `state.routing.path`.
1717

18+
[View the new docs](https://github.com/rackt/redux-simple-router#api)
19+
1820
## [1.0.2](https://github.com/jlongster/redux-simple-router/compare/1.0.1...1.0.2)
1921

2022
* Only publish relevant files to npm

README.md

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,18 +49,16 @@ import React from 'react'
4949
import ReactDOM from 'react-dom'
5050
import { compose, createStore, combineReducers, applyMiddleware } from 'redux'
5151
import { Provider } from 'react-redux'
52-
import { Router, Route } from 'react-router'
53-
import { createHistory } from 'history'
52+
import { Router, Route, browserHistory } from 'react-router'
5453
import { syncHistory, routeReducer } from 'redux-simple-router'
5554
import reducers from '<project-path>/reducers'
5655

5756
const reducer = combineReducers(Object.assign({}, reducers, {
5857
routing: routeReducer
5958
}))
60-
const history = createHistory()
6159

6260
// Sync dispatched route actions to the history
63-
const reduxRouterMiddleware = syncHistory(history)
61+
const reduxRouterMiddleware = syncHistory(browserHistory)
6462
const createStoreWithMiddleware = applyMiddleware(reduxRouterMiddleware)(createStore)
6563

6664
const store = createStoreWithMiddleware(reducer)
@@ -70,7 +68,7 @@ reduxRouterMiddleware.listenForReplays(store)
7068

7169
ReactDOM.render(
7270
<Provider store={store}>
73-
<Router history={history}>
71+
<Router history={browserHistory}>
7472
<Route path="/" component={App}>
7573
<Route path="foo" component={Foo}/>
7674
<Route path="bar" component={Bar}/>
@@ -123,8 +121,6 @@ _Have an example to add? Send us a PR!_
123121

124122
### API
125123

126-
**This API is for an unreleased version. To view docs for 1.0.2, [click here](https://github.com/rackt/redux-simple-router/tree/1.0.2#api)**
127-
128124
#### `syncHistory(history: History) => ReduxMiddleware`
129125

130126
Call this to create a middleware that can be applied with Redux's `applyMiddleware` to allow actions to call history methods. The middleware will look for route actions created by `push`, `replace`, etc. and applies them to the history.
@@ -137,7 +133,7 @@ Supply an optional function `selectRouterState` to customize where to find the r
137133

138134
#### `ReduxMiddleware.unsubscribe()`
139135

140-
Call this on the middleware returned from `syncHistory` to stop the syncing process set up by `listenForReplays`.
136+
Call this on the middleware returned from `syncHistory` to stop the syncing process set up by `listenForReplays`.
141137

142138
#### `routeReducer`
143139

0 commit comments

Comments
 (0)