Replies: 2 comments
-
Hi! I'm not very familiar with Tonic, but looks like it's an async library. To make a request when a component rendersYou can use As for sample code, you can take a look at Dioxus examples that have To make a request in response to a user actionYou can use cx.spawn to spawn a future imperatively. An example where this is used is login_form. Again, Apart from that, I don't think there will be anything Dioxus-specific, so you can just follow the usual Tonic docs. Admittedly, at first glance, they're not very simple, but it looks like they have a nice tutorial to get started. Also take a look at tonic examples. Good luck! |
Beta Was this translation helpful? Give feedback.
-
I can add a little more here, in case others stumble on this in the future. The key problem with There are a few developing libraries out there to help with this. one, for example, is https://docs.rs/tonic-web-wasm-client/latest/tonic_web_wasm_client/ ; I have not used it, YMMV. |
Beta Was this translation helpful? Give feedback.
-
Unfortunately, I couldn't find a solution or sample code.
Is it feasible?
And if so, how?
Thank you very much.
Beta Was this translation helpful? Give feedback.
All reactions