AppProvider Component
Description
The AppProvider
is a context provider that manages global state for the Liberty Framework. It provides access to:
- Authentication state
- Application properties
- User properties
- Module configurations
- Snack messages
- WebSocket handling
This provider allows injecting custom functions for retrieving data such as applications, users, tokens, and menus.
Props
Prop | Type | Default | Description |
---|---|---|---|
children |
ReactNode |
- | Components wrapped by the provider. |
useAuth |
() => AuthContextProps |
- | Custom authentication hook. |
getModules |
() => Promise<IModulesProps> |
- | Fetch function for modules configuration. |
getApplications |
() => Promise<IAppsProps> |
- | Fetch function for application settings. |
getUser |
() => Promise<IUsersProps> |
- | Fetch function for user details. |
getMenus |
() => Promise<IMenusProps> |
- | Fetch function for application menus. |
Example Usage
Useful Links
🔗 GitHub Repository (Core): Liberty Core
🔗 GitHub Repository (Test Project): Liberty Test
📖 Live Documentation: Liberty Core Docs
💖 Sponsor & Support: Sponsor Liberty Core