Skip to main content
Version: 1.1.0

useCASharePointNotificationCenter

@spartanfx/react v1.1.0


@spartanfx/react / codeapps / useCASharePointNotificationCenter

Function: useCASharePointNotificationCenter()

function useCASharePointNotificationCenter(config): INotificationCenterHook;

Power Apps Code Apps NotificationCenter hook backed by SharePoint.

Consumes a generated <ListName>Service from pac code add-data-source targeting the SharePoint connector (shared_sharepointonline).

Parameters

config

IUseCASharePointNotificationCenterConfig

Returns

INotificationCenterHook

Example

import { NotificationsService } from './generated/services/NotificationsService';
import { useCASharePointNotificationCenter } from '@spartanfx/react/codeapps';

const hook = useCASharePointNotificationCenter({
service: NotificationsService,
onNotify: (level, msg) => toast[level](msg),
});
return <NotificationCenter provider={hook} />;