@@ -3,6 +3,9 @@
3//! ## Example
3//! ## Example
5//! ```no_run
5//! ```no_run
6+//! use dodrio::{on, bumpalo::Bump, Attribute, Node, Render};
7+//! use wasm_bindgen::UnwrapThrowExt;
6//! /// A component that greets someone.
9//! /// A component that greets someone.
7//! pub struct Hello<'who> {
10//! pub struct Hello<'who> {
8//! who: &'who str,
11//! who: &'who str,
@@ -29,10 +32,10 @@
29//! [on(bump, "click", |root, _vdom, _event| {
32//! [on(bump, "click", |root, _vdom, _event| {
30//! let hello = root.unwrap_mut::<Hello>();
33//! let hello = root.unwrap_mut::<Hello>();
31//! let window = web_sys::window().expect_throw("should have a `Window` on the Web");
34//! let window = web_sys::window().expect_throw("should have a `Window` on the Web");
32−//! window.alert(hello.who);
35+//! window.alert_with_message(hello.who);
34//! // Attributes.
37//! // Attributes.
35−//! [Attribute { name: "id", value: &id }],
38+//! [Attribute { name: "id", value: id.into_bump_str() }],
36//! // Child nodes.
39//! // Child nodes.
38//! Node::text("Hello, "),
41//! Node::text("Hello, "),