SourcingProvider
Provides the SourcingClient to SourcingChat and useSourcingClient().
The hook returned the client from the provider.
Example
const client = new SourcingClient({ baseUrl: '/api/v2' });
export function SourcingPanel() {
return (
<SourcingProvider client={client}>
<SourcingChat />
</SourcingProvider>
);
}
Props
| Prop | Type | |
|---|---|---|
client | SourcingClient | The client the chat calls. |
children | ReactNode | The tree that may call useSourcingClient(). |