liveBook · Manning

Message

As explained in Refactoring to Rust

A Yew message is a value representing an action that can be processed by a component update operation.

A Yew message is a value representing an action that a component processes in its update operation. Declare message variants as an enum, associate that enum with the component, and match each received value to a state change, event, or asynchronous request. section 9.5

How Refactoring to Rust covers it

How deep it goes
Defines message variants and demonstrates matching, state mutation, rerender signaling, and asynchronous follow-up requests.
Examples
Uses pagination, feed-fetch states, a More button, and search results to demonstrate message-driven updates.
What you can do after
Apply it via Yew's Component trait to model actions and update component state in response to events or requests.
How it connects
Connects messages to Yew components, component state, view rendering, event callbacks, and asynchronous operations.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Refactoring to Rust. The section links point to the parts of the book it draws on.