- Preparing search index...
- The search index is not available
@dopt/react
- DoptProvider(props: ProviderConfig | MockProviderConfig): ReturnType<typeof MockDoptProvider> | ReturnType<typeof DoptProvider>
Alpha
Returns ReturnType<typeof MockDoptProvider> | ReturnType<typeof DoptProvider>
Returns the appropriate DoptProvider based on the props provided.
Remarks
The BaseProvider (exposed as DoptProvder) can currently be configured to support two distinct usages
Using ProviderConfig
Example
Using MockProviderConfig
Example
Returns
props is MockProviderConfig ? MockDoptProvider : DoptProvider