App
A root provider component that enables context-based imperative APIs for message, notification, and modal.
When to Use
- Wrap your application root to enable
App.useApp()hook - For accessing message, notification, and modal APIs within React context
- To ensure proper DOM mounting for imperative feedback components
Import
Examples
Basic Setup
API
AppProps
children—ReactNode— Application contentclassName—string— Root element CSS classstyle—CSSProperties— Root element stylescomponent—string | false— Root HTML element (default:"div",falsefor fragment)
App.useApp()
Returns an object with context-aware imperative APIs:
message— Message API (success, error, info, warning, loading)notification— Notification API (success, error, info, warning, open)modal— Modal API (confirm, info, success, error, warning)