I am using Leptos to build my project. I am having trouble passing a string from rust to js using wasm-bindgen and leptos. How to do so? #2020
Unanswered
kushasupaya
asked this question in
Q&A
Replies: 1 comment 4 replies
-
I'm sorry, I'm not sure what this means. All I see in what you've provided is a JavaScript snippet. I don't know what errors or issues you're facing using it from Rust. |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have some Js files that processes some info provided to it from the rust code and returns an array. Using wasm-bindgen I am able to get the array in my rust/leptos code. But I also have to pass some info from my rust code to Js file. I am using wasm-bindgen in my Leptos project. In my Js file I have an import section but
trunk serve --open
always creates a new wasm-js file so the import is useless or am I doing something wrong. Below is my js codeAlso can I process the array in rust. I am being able to console log in my rust code but how can I use it as a rust vec?
Beta Was this translation helpful? Give feedback.
All reactions