({ state })
in their argument but that gets stripped out when you consume them:tiny-router
(and all packages that want to implement the router
API) exposes the action actions.router.set()
. This action modifies state.router.link
and makes sure that the URL of your browser is in sync. Additionally, tiny-router
also runs this action if users click on the back and forward buttons of their browsers.init
(client & server)beforeSSR
(server only)beforeSSR
which is called with an object that contains the Koa Context in the ctx
parameter. You can use this ctx
to modify things like status codes, headers and so on.afterSSR
(server only)state
snapshot is taken and the HTML is sent to the client. Therefore, packages can use the afterSSR
step for things like setting headers or removing parts of the state
that shouldn't be exposed to the client.beforeCSR
(client only)beforeSSR
.afterCSR
(client only)