Update README.md with correct 'location:set' usage (#362)
Struggled with a bit when upgrading to v4.0.
This commit is contained in:
committed by
Yoshua Wuyts
parent
1749cb374f
commit
0719c43855
@@ -366,7 +366,7 @@ Under the hood `choo` uses [sheet-router]. Internally the
|
|||||||
currently rendered route is kept in `state.location`. To access the route
|
currently rendered route is kept in `state.location`. To access the route
|
||||||
`:params` you can use `state.location.params`. If you want to modify
|
`:params` you can use `state.location.params`. If you want to modify
|
||||||
the location programmatically the `reducer` for the location can be called
|
the location programmatically the `reducer` for the location can be called
|
||||||
using `send('location:set', { location: href })`. This will not work
|
using `send('location:set', href)`. This will not work
|
||||||
from within namespaced `models`, and usage should preferably be kept to a
|
from within namespaced `models`, and usage should preferably be kept to a
|
||||||
minimum. Changing views all over the place tends to lead to messiness.
|
minimum. Changing views all over the place tends to lead to messiness.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user