Asynchronously send global events to the frontend #4272
-
|
I want to use like this tauri::async_runtime::spawn(async move {
// app.emit_all("some_event", "message");
});
app.run(app::handle_app_event);but tauri |
Beta Was this translation helpful? Give feedback.
Answered by
FabianLars
Jun 5, 2022
Replies: 1 comment
-
|
Try using an AppHandle: let handle = app.handle();
tauri::async_runtime::spawn(async move {
handle.emit_all("some_event", "message");
}); |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
luoffei
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Try using an AppHandle: