0.5.0
版本发布时间: 2019-08-11 07:26:51
yewstack/yew最新发布版本:yew-v0.21.0(2023-09-29 19:14:55)
🎶 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 asend_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 settingCredentials
offetch
request. -
FetchService
aborts requests usingAbortController
. - Added
SubmitEvent
withonsubmit
rule.
- Introduced the concept of an
-
🛠 Fixes
- Bug with emscripten target
RuntimeError: index out of bounds
fixed with a new scheduler [[@DenisKolodin], #272]
- Bug with emscripten target
-
🚨 Breaking changes
-
send_back
method requires a mutable reference toself
. This was added to prevent creating callbacks inview
implementations. [[@DenisKolodin], #367] -
Context
requirement removed. It's no longer necessary to useComponent<CTX>
type parameter. Instead, a link to the environment is provided with theComponent::create
call. [[@DenisKolodin], #272]
-