Better integration with router.

- route can be updated after state switch
- configurable update behavior (updateRoute, replace)