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

Commit 4058139

Browse files
committed
Update the README
1 parent 3545a3e commit 4058139

File tree

1 file changed

+19
-8
lines changed

1 file changed

+19
-8
lines changed

README.md

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ npm install redux-simple-router
3131

3232
[redux-router](https://github.com/rackt/redux-router) is another
3333
project which solves the same problem. However, it's far more complex.
34-
Just look at this code: the whole thing is only 68 lines of JS.
34+
Just look at this code: the whole thing is only a small JS file.
3535
redux-router is much bigger and more complex.
3636

3737
That said, redux-router is a fine project and has features this
@@ -154,15 +154,26 @@ piece of state must be named `routing`** (unless you provide a custom
154154

155155
### `UPDATE_PATH`
156156

157-
An action type that you can listen for in your reducers.
157+
An action type that you can listen for in your reducers to be notified of
158+
route updates.
158159

159-
### `updatePath(path, noRouterUpdate)`
160+
### `pushPath(path, state, { avoidRouterUpdate = false } = {})`
160161

161-
An action creator that you can use to update the current URL. Just
162-
pass it a string like `/foo/bar?param=5`.
162+
An action creator that you can use to update the current URL and update the
163+
browser history. Just pass it a string like `/foo/bar?param=5` as the
164+
`path` argument.
163165

164-
The `noRouterUpdate`, if `true`, will stop react-router from reacting
165-
to this and all future URL changes. Pass `false` to make it start
166-
reacting again. This is useful if replaying snapshots while using the
166+
You can optionally pass a state to this action creator to update the state of the
167+
current route.
168+
169+
The `avoidRouterUpdate`, if `true`, will stop react-router from reacting
170+
to this URL change. This is useful if replaying snapshots while using the
167171
`forceRefresh` option of the browser history which forces full
168172
reloads. It's a rare edge case.
173+
174+
### `replacePath(path, state, { avoidRouterUpdate = false } = {})`
175+
176+
An action creator that you can use to replace the current URL without updating
177+
the browser history.
178+
179+
The `state` and the `avoidRouterUpdate` parameters work just like `pushPath`.

0 commit comments

Comments
 (0)