Revert "improved documentation and refactored naming to be more self-explanatory"
This reverts commit adfbb6c380.
This commit is contained in:
1 parent
adfbb6c380
commit
906c466e78
91 files changed
+1553
-1663
No files matched your search
+13
-14
@@ -7,26 +7,25 @@ fn main() {
|
||||
fn app(cx: Scope) -> Element {
|
||||
let eval_provider = use_eval(cx);
|
||||
|
||||
let future =
|
||||
use_future(cx, (), |_| {
|
||||
to_owned![eval_provider];
|
||||
async move {
|
||||
let eval = eval_provider(
|
||||
r#"
|
||||
let future = use_future(cx, (), |_| {
|
||||
to_owned![eval_provider];
|
||||
async move {
|
||||
let eval = eval_provider(
|
||||
r#"
|
||||
dioxus.send("Hi from JS!");
|
||||
let msg = await dioxus.recv();
|
||||
console.log(msg);
|
||||
return "hello world";
|
||||
"#,
|
||||
)
|
||||
.unwrap();
|
||||
)
|
||||
.unwrap();
|
||||
|
||||
eval.send("Hi from Rust!".into()).unwrap();
|
||||
let res = eval.recv().await.unwrap();
|
||||
println!("{:?}", eval.await);
|
||||
res
|
||||
}
|
||||
});
|
||||
eval.send("Hi from Rust!".into()).unwrap();
|
||||
let res = eval.recv().await.unwrap();
|
||||
println!("{:?}", eval.await);
|
||||
res
|
||||
}
|
||||
});
|
||||
|
||||
match future.value() {
|
||||
Some(v) => cx.render(rsx!(
|
||||
|
||||
Reference in new issue
Block a user