Skip to content

v0.7.0

Compare
Choose a tag to compare
@shogowada shogowada released this 12 Apr 12:11
· 39 commits to master since this release

Breaking changes:

  • Router components now take any attributes
    • Change this
      <.Router(history = HashHistory)(
      <.Route(path = "/", component = new App())(
        <.Route(path = "about", component = new About())(),
        <.Route(path = "repos", component = new Repos())(
          <.Route(path = ":id", component = new Repo())()
        ),
        <.Route(path = "form", component = new Form())()
      )
      to this
      <.Router(^.history := HashHistory)(
            // ^.        :=
      <.Route(^.path := "/", ^.component := new App())(
        <.Route(^.path := "about", ^.component := new About())(),
        <.Route(^.path := "repos", ^.component := new Repos())(
          <.Route(^.path := ":id", ^.component := new Repo())()
        ),
        <.Route(^.path := "form", ^.component := new Form())()
      )
    • This adds some boilerplate code (^. and :=), but you can now do this:
      <.Link(^.to := "/login", ^.className := Set("btn", "btn-default"))