Available on crate feature
radio only.Expand description
Reexport freya-radio when the radio feature is enabled.
Structs§
- Radio
- A reactive handle to the global state for a specific channel.
Radioprovides methods to read and write the global state, and automatically subscribes the current component to re-render when the associated channel is notified. - Radio
Antenna - Radio
Guard - Radio
Station - The central hub for global state management in Freya applications.
A
RadioStationholds the global state value and manages subscriptions to different channels. Components can subscribe to specific channels to receive notifications when the state changes.
Enums§
Traits§
- Data
Async Reducer - Data
Reducer - Trait for implementing a reducer pattern on your state. Reducers allow you to define actions that modify the state in a controlled way.
- Radio
Async Reducer - Radio
Channel - 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
RadioStationandRadio. - Radio
Reducer
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
Radiohandle 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
RadioStationto descendant components. This is useful for sharing the same global state across different parts of the component tree or across multiple windows.