Home > @cascadiacollections/fluentui-compat > SmartFluentProvider
SmartFluentProvider variable
A smart FluentProvider that automatically detects when it would be redundant and either warns in development or skips creating a provider in production.
This helps prevent unnecessary provider nesting while maintaining the same API as the standard FluentProvider.
Signature:
SmartFluentProvider: React.ForwardRefExoticComponent<SmartFluentProviderProps & React.RefAttributes<HTMLDivElement>>
Example
import { SmartFluentProvider } from 'fluentui-compat';
// Will automatically detect if this provider is redundant
<SmartFluentProvider theme={webLightTheme}>
<MyComponent />
</SmartFluentProvider>