fix(doc): minor edits (#353)
* chaning location:setLocation to location: set I believe this is how the v4 api is supposed to be used * adding note about :params I had a hard time locating this information, and I feel like it's pretty crucial when using a router.
This commit is contained in:
committed by
Yoshua Wuyts
parent
e66d25cbe7
commit
08aa47c06f
@@ -363,9 +363,10 @@ entry point of the application also becomes a site map, making it easier to
|
|||||||
figure out how views relate to each other.
|
figure out how views relate to each other.
|
||||||
|
|
||||||
Under the hood `choo` uses [sheet-router]. Internally the
|
Under the hood `choo` uses [sheet-router]. Internally the
|
||||||
currently rendered route is kept in `state.location`. If you want to modify
|
currently rendered route is kept in `state.location`. To access the route
|
||||||
|
`: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:setLocation', { location: href })`. This will not work
|
using `send('location:set', { location: 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