tauri-syntax-state
Installation
SKILL.md
tauri-syntax-state
Quick Reference
State Registration (Tauri 2.x)
| Method | Context | Description |
|---|---|---|
Builder::manage(T) |
Builder chain | Register state during app construction |
App::manage(T) |
setup() hook |
Register state that depends on app initialization |
AppHandle::manage(T) |
Any context | Register state at runtime (rare) |
State Access
| Method | Context | Returns |
|---|---|---|
State<'_, T> |
Command parameter | Injected automatically by Tauri |
app_handle.state::<T>() |
Any code with AppHandle | State<'_, T> (panics if not registered) |
app_handle.try_state::<T>() |
Any code with AppHandle | Option<State<'_, T>> (safe) |
Related skills