HerringtonDarkholme / av-ts

A modern, type-safe, idiomatic Vue binding library
MIT License
216 stars 11 forks source link

Suggestion: Better vue-router lifecycle support #72

Closed whitetrefoil closed 6 years ago

whitetrefoil commented 6 years ago

Current version doesn't support vue-router lifecycles well (e.g. no vm in beforeRouteEnter). I tried to solve it by myself, but felt my implementation some how ugly...

Still I filed it as a PR to help describing my point.

whitetrefoil commented 6 years ago

I said ugly because my solution is not easier than the previous one:

  @Lifecycle
  async beforeRouteEnter(to: Route, from: Route, next: Function) {
    next((vm: MyPage) => {
    ......
HerringtonDarkholme commented 6 years ago

I've released v0.10.0 to include this!