27 questions
0
votes
1
answer
347
views
Installing cargo-leptos on my machine (windows) causes a linker error?
I've been trying to install cargo-leptos on my machine.
I've installed it without issues on another machine before (also windows) but now I'm running into some issues.
When I run
cargo install --...
1
vote
2
answers
196
views
How to set style of a HTML element in Leptos?
I am using leptos to build a web application. I want to do what is mentioned in this answer: https://stackoverflow.com/a/45037551/6938024
function shake() {
var box = document.getElementById("...
1
vote
1
answer
98
views
Optional generic callbacks/functions parameters for structure in the Rust
Hello I am implementing a Rust application with Leptos. I am experimenting a lot, and learning at the same time, so I am doing things that probably are not the best, but I want to solve problems I see....
3
votes
1
answer
618
views
Uploading a file with leptos
I am struggling quite a bit with understanding how to upload a multipart file in leptos.
Here is where I am at right now
let on_file_input = move |ev| {
log!("file input");
...
0
votes
1
answer
224
views
Custom tailwind class pattern matcher for Leptos
In rust Leptos framework, attributes can be defined as follows. Syntax is
<attribute>:<class_name>=<boolean>
If the boolean is true, class name will be added to the existing list. ...
2
votes
1
answer
697
views
add leptosfmt to Zed settings.json
currently i'm typing
leptosfmt .
each time i want to format the html within the view!{} macro. I'd like to automate this on save or whenever rustfmt runs.
I tried adding a rustfmt section to my Zed ...
1
vote
1
answer
937
views
How to listen to "Backend" value change in tauri-leptos app?
I have tauri command on backend(tauri) that returns a string(light theme value from windows registry). I need to get it on frontend + listen if this string changes. I couldn't find needed functions in ...
1
vote
1
answer
323
views
What's the right way to configure leptosfmt to work with Lunarvim?
I'm trying to configure leptosfmt to work with Lunarvim, so that I can format my view! macros on save. I've not yet found a clean working solution. Here's what I've found and tried:
Based on the ...
0
votes
1
answer
120
views
How can I get on:paste to work with `web_sys`?
For the project I want the verification code part of the sign up stepper to have each number separated into small boxes and when pasted the code will be pasted into each individual box. The problem is ...
1
vote
0
answers
421
views
Leptos using NodeRef in an x*y Grid
I have a grid that has x * y number of inputs (that also can change over time).
I want to have NodeRefs (since I only need to read the values on submit() of the form.)
My Idea was a Vec<Vec<...
0
votes
1
answer
980
views
How to run a slow task on button:click with Leptos?
I'm trying to PGP encrypt a string client side when user clicks on a button and this seems to be super slow.
First when running in debug/dev mode with trunk serve --open it takes ages for the page to ...
3
votes
1
answer
3k
views
Axum with Leptos: how do I get AppState in [server] Macro?
I try to work with axum and leptos on a fullstack app
I am trying to use a server shared resource with SSR leptos handlers, which usually would be an AppState struct added to the router with ...
0
votes
2
answers
901
views
How to avoid warning "You access a signal or memo outside a reactive tracking context"
I have an async action which alters data in an external api (POST request). When the request has finished, then I need to refetch data from this api, in order to reflect the changes in the view. But ...
0
votes
1
answer
1k
views
Leptos router gives a warning which I do not unterstand
I stared to experiment with https://github.com/gbj/leptos/ using the current main branch from Git. Following the router example I get the following warning in my console in the browser:
WARNING: You ...