Module hooks

Module hooks 

Source

Structs§

Radio
A reactive handle to the global state for a specific channel. Radio provides methods to read and write the global state, and automatically subscribes the current component to re-render when the associated channel is notified.
RadioAntenna
RadioGuard
RadioStation
The central hub for global state management in Freya applications. A RadioStation holds the global state value and manages subscriptions to different channels. Components can subscribe to specific channels to receive notifications when the state changes.

Enums§

ChannelSelection

Traits§

DataAsyncReducer
DataReducer
Trait for implementing a reducer pattern on your state. Reducers allow you to define actions that modify the state in a controlled way.
RadioAsyncReducer
RadioChannel
Defines a channel for radio communication. Channels are used to subscribe to specific changes in the global state. Each channel must implement this trait to be used with RadioStation and Radio.
RadioReducer

Functions§

use_init_radio_station
Initialize a new radio station in the current component tree. This provides the global state to all descendant components.
use_radio
Subscribe to the global state for a specific channel. Returns a Radio handle that allows reading and writing the state. The current component will re-render whenever the specified channel is notified.
use_radio_station
use_share_radio
Provide an existing RadioStation to descendant components. This is useful for sharing the same global state across different parts of the component tree or across multiple windows.