yew v0.5 Release Notes

Release Date: 2019-02-01 // about 5 years ago
  • ๐ŸŽถ Secret Agent Man ๐ŸŽถ

    ๐Ÿš€ This release introduces the concept of an Agent. Agents are separate activities which you could run in the same thread or in a separate thread. There are three types of agents Context, Job, Public described below. To connect to an agent use the Worker::bridge method and pass a link of component's environment to it.

    • โšก๏ธ Features

      • Introduced the concept of an Agent which can run processes in other contexts:
      • Context agent spawns once per thread
      • Job agent spawns for every bridge
      • Public agent spawns an agent in a separate thread (it uses [Web Workers API] under the hood).
      • Allow setting the whole properties struct of a component with <Component: with props />
      • ComponentLink now has a send_self method which allows components to update themselves [[@DenisKolodin], #365]
      • All services are re-exported within the yew::services module.
      • html! macro supports multiple classes in a single string: <a class="button is-primary",>.
      • Added FetchOptions to allow setting Credentials of fetch request.
      • FetchService aborts requests using AbortController.
      • Added SubmitEvent with onsubmit rule.
    • ๐Ÿ›  #### ๐Ÿ›  Fixes

      • Bug with emscripten target RuntimeError: index out of bounds fixed with a new scheduler [[@DenisKolodin], #272]
    • ๐Ÿšจ Breaking changes

      • send_back method requires a mutable reference to self. This was added to prevent creating callbacks in view implementations. [[@DenisKolodin], #367]
      • Context requirement removed. It's no longer necessary to use Component<CTX> type parameter. Instead, a link to the environment is provided with the Component::create call. [[@DenisKolodin], #272]