Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Ari Breitkreuz committed Jan 4, 2024
1 parent 612d150 commit 6c38ff9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
10 changes: 5 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "frontest"
version = "0.2.0"
version = "0.3.0"
edition = "2021"
authors = ["Maciej Zwoliński <mac.zwolinski@gmail.com>"]
repository = "https://github.com/zwo1in/frontest-rs"
Expand All @@ -21,9 +21,9 @@ readme = "README.md"
default = ["yew"]

[dependencies]
gloo = { version = "0.6", features = ["futures"] }
wasm-bindgen = "0.2.79"
web-sys = { version = "0.3.56", features = [
gloo = { version = "0.11", features = ["futures"] }
wasm-bindgen = "0.2.89"
web-sys = { version = "0.3", features = [
"Document",
"Element",
"HtmlElement",
Expand All @@ -40,7 +40,7 @@ web-sys = { version = "0.3.56", features = [
"NodeList",
] }

yew = { version = "0.19", optional = true }
yew = { version = "0.21", optional = true, features = ["csr"] }

[dev-dependencies]
wasm-bindgen-test = "0.3"
Expand Down
5 changes: 4 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,8 @@ pub mod yew {
let div = gloo::utils::document().create_element("div").unwrap();
gloo::utils::body().append_child(&div).unwrap();
let res = div.clone();
::yew::start_app_with_props_in_element::<Wrapper>(div, WrapperProps { content });
::yew::Renderer::<Wrapper>::with_root_and_props(div, WrapperProps { content }).render();
::yew::platform::time::sleep(std::time::Duration::ZERO).await;

res
}
Expand Down Expand Up @@ -307,6 +308,8 @@ pub mod yew {

assert_eq!("Value: 0", value.inner_text());
button.click();
// Events are handled when the scheduler is yielded. So we need to add this after any interaction with the DOM.
::yew::platform::time::sleep(std::time::Duration::ZERO).await;
assert_eq!("Value: 1", value.inner_text());

body().remove_child(&mount).unwrap();
Expand Down

0 comments on commit 6c38ff9

Please sign in to comment.