-
-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Looking for a way to access Tauri App
or AppHandle
from within router.
#244
Comments
This has been fixed on the
What exact error? If Tauri supports delayed plugin mounting it would theoretically be allowed to capture the handle as long as the closure has |
Thanks for the help. If I try to use basically anything from
|
Oh! Messing around with this, I got it to work by putting the value in an |
This if fixed by 0.2.0 which now takes in the Sorry, it's taken me so long to get to this. |
I'm using the Tauri transport for rspc, and I'm having some trouble with context. I need to be able to pass either the app (
tauri::App
) or app handle (tauri::AppHandle
) into my router via context, but I can't figure out a way to do this.If I create the tauri plugin at the "top level" like the docs demonstrate (by chaining it to
tauri::Builder::default().plugin(...)
), then I don't have access toapp
to pass in since it's passed into closures in later chained calls likesetup()
.When I try to create the plugin from within the
setup()
function likeapp.handle().plugin(rspc::integrations::tauri::plugin(...)
I get yelled at by the compiler if I try to pass in anything to do with the app or AppHandle.Is there a supported/recommended way to access the
App
orAppHandle
using context? Or, if not, a workaround to access it from my router?The text was updated successfully, but these errors were encountered: