@bleckcorp/easysupport-react
v0.1.1
Published
React lifecycle wrapper for the EasySupport browser SDK.
Readme
@bleckcorp/easysupport-react
React lifecycle integration for EasySupport.
pnpm add @bleckcorp/easysupport-reactimport { EasySupportProvider } from '@bleckcorp/easysupport-react';
<EasySupportProvider
config={{
enabled: true,
backendUrl: import.meta.env.VITE_EASYSUPPORT_BACKEND_URL,
widgetScriptUrl: import.meta.env.VITE_EASYSUPPORT_WIDGET_SCRIPT_URL,
appKey: import.meta.env.VITE_EASYSUPPORT_APP_KEY,
widgetKey: import.meta.env.VITE_EASYSUPPORT_WIDGET_KEY,
diagnostics: {
screenshots: true,
redact: ['[data-customer-record]'],
},
}}
user={currentUser}
context={{ organization: tenant.name, tenantId: tenant.id, surface: 'customer-portal' }}
>
<App />
</EasySupportProvider>Changing user or context updates the mounted widget. Disabling the integration or unmounting the provider
destroys it. The provider never forwards authentication tokens unless an application explicitly and incorrectly
places one in its configuration.
