-
Hi. Followed the installation/usage guide from the README, and I can add the
Stack of "called `Option::unwrap()` on a `None` value" panicStack:
Yes, I've added I can verify that there aren't any elements with the id <h1 data-hk="0-0-0-14"><!--hk=0-0-0-15o|leptos-dyn-child-start-->Welcome to Leptos!<!--hk=0-0-0-15c|leptos-dyn-child-end--></h1>
<button data-hk="0-0-0-16">Click Me: <!--hk=0-0-0-17o|leptos-dyn-child-start-->0<!--hk=0-0-0-17c|leptos-dyn-child-end--></button> the component looks like this: /// Renders the home page of your application.
#[component]
fn HomePage() -> impl IntoView {
// Creates a reactive value to update the button
let (count, set_count) = create_signal(0);
let on_click = move |_| set_count.update(|count| *count += 1);
view! {
// <h1>"Welcome to Leptos!"</h1>
<h1>{move || tr!("welcome-leptos")}</h1>
<button on:click=on_click>"Click Me: " {count}</button>
}
} What am I doing wrong? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
After playing around some more, I've made some interesting discoveries. <h1>{tr!("welcome-leptos")}</h1>
<button on:click=on_click>{move || tr!("click-me")}: {move || {
tr!("clicks", {
"count" => count()
})
}}</button> Notice the lack of This has to be some kind of bug, right? Here's the fluent file, if it matters:
EDIT: Put the code up here: https://github.com/ilyvion/leptos-fluent-bug if anyone wants to try for themselves. |
Beta Was this translation helpful? Give feedback.
-
I can't reproduce them. BTW, I can't even compile your MRE as is, needed to remove this line from Cargo.toml: name = "inventory" And used the new lib in main.rs: use inventory_spa::app::*;
use inventory_spa::fileserv::file_and_error_handler; Otherwise, I experiment the next error compiling the front:
And I added the proper target to rust-toolchain.toml: [toolchain]
channel = "nightly"
target = "wasm32-unknown-unknown" Are you using the proper target? How could your example compile naming I'm using Ubuntu. You're on Windows, right? |
Beta Was this translation helpful? Give feedback.
I can't reproduce them. BTW, I can't even compile your MRE as is, needed to remove this line from Cargo.toml:
And used the new lib in main.rs:
Otherwise, I experiment the next error compiling the front:
And I added the proper target to rust-toolchain.toml: