Module yew::prelude[][src]

Expand description

The Yew Prelude

The purpose of this module is to alleviate imports of many common types:

use yew::prelude::*;


pub use crate::callback::Callback;
pub use crate::context::ContextProvider;
pub use crate::events::*;
pub use crate::html::create_portal;
pub use crate::html::Html;
pub use crate::html::NodeRef;
pub use crate::macros::html;
pub use crate::functional::*;



An instance of an application.

A set of classes.

The Component’s context. This contains component’s Scope and and props and is passed to every lifecycle method.


Components are the basic building blocks of the UI in a Yew app. Each Component chooses how to display itself using received props and self-managed state. Components can be dynamic and interactive by declaring messages that are triggered and handled asynchronously. This async update mechanism is inspired by Elm and the actor model used in the Actix framework.

Trait for building properties for a component

Type Definitions

A type used for accepting children elements in Component::Properties.

A type used for accepting children elements in Component::Properties and accessing their props.

Derive Macros