Crate yew_side_effect[][src]

Expand description

Reconcile Side Effects in Yew Applications

This library is inspired by react-side-effect and react-helmet.

Usage

  1. Define a SideEffectType

Each side effect needs to have a different type(struct).

  1. Define a Side Effects Context Provider using SideEffectProvider<T>

  2. Set Side Effects with SideEffect<SideEffectType>

All side effects will be collected at component’s creation order.

Please refer to source code of title for a complete example.

Modules

A side effect that controls document.title.

Structs

A collection of all registered side effect values of a certain side effect.

Functions

A hook to read side effect.

Type Definitions

Registers a single side effect.

Provider of a Side Effect.