init

Function init 

Source
pub fn init()
Expand description

Initialize the cookie system.

Call this before dioxus::launch() in your main() function. This sets up the platform-appropriate cookie storage backend.

  • Server: No-op (cookies handled via HTTP headers)
  • Browser: No-op (cookies handled via document.cookie)
  • Desktop/Mobile: Initializes system keyring and configures HTTP client

§Example

fn main() {
    dioxus_cookie::init();
    dioxus::launch(App);
}

§Panics

Panics if called after dioxus::launch() has already initialized the HTTP client.