-
FE Code: useEffect(() => {
invoke<string>("get_game_location").then(x => console.info(x))
}, []) Rust code: #[tauri::command]
pub fn get_game_location(config: tauri::State<'_, ConfigState>) -> Result<String, String> {
match &config.game_location {
Some(game_location) => Ok(game_location.clone()),
None => Err(String::default()),
}
} tauri info:
|
Beta Was this translation helpful? Give feedback.
Answered by
Crauzer
Oct 11, 2021
Replies: 1 comment
-
My bad, the command does work, but only inside the window. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Crauzer
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
My bad, the command does work, but only inside the window.