dioxus_provider/
lib.rs

1#![doc = include_str!("../README.md")]
2
3// Core modules
4pub mod cache;
5pub mod global;
6
7pub mod hooks;
8pub mod injection;
9pub mod platform;
10pub mod refresh;
11pub mod types;
12
13pub mod prelude {
14    //! The prelude exports all the most common types and functions for using dioxus-provider.
15
16    // The main provider trait and the macro
17    pub use crate::hooks::Provider;
18    pub use dioxus_provider_macros::provider;
19
20    // The core hook for using providers
21    pub use crate::hooks::use_provider;
22
23    // Hooks for manual cache management
24    pub use crate::hooks::use_clear_provider_cache;
25    pub use crate::hooks::use_invalidate_provider;
26    pub use crate::hooks::use_provider_cache;
27
28    // The async state enum, needed for matching
29    pub use crate::cache::AsyncState;
30
31    // Global initialization
32    pub use crate::global::init_global_providers;
33
34    // Dependency Injection
35    pub use crate::injection::{
36        clear_dependencies, has_dependency, init_dependency_injection, inject, register_dependency,
37    };
38}