github yewstack/yew 0.5.0
v0.5.0

latest releases: yew-v0.21.0, yew-agent-macro-v0.2.0, yew-router-v0.18.0...
4 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]

Don't miss a new yew release

NewReleases is sending notifications on new releases.