@squiz/notifications-lib
v1.16.0-beta.4
Published
## Description
Downloads
723
Maintainers
Keywords
Readme
Notifications Lib
Description
The Notifications Library is used by notification dashboard, in-page and badge notifications.
It uses React context to wrap components and uses underling services to control access, creation and display of notifications.
Services are using Squiz DataStore for controlling ACL and notifications storage.
JWT minting can be used by any system, but preference is Matrix token assets.
Usage
const jwtService = new JWTTokenService(jwtServiceUrl);
const notificationService = new DatastoreNotificationService({ baseUrl, jwtService });
// Optional used for controling ACL
const aclService = new DatastoreAclService({ baseUrl, jwtService });
const jwtService = new JWTTokenService(componentSettings.jwtServiceUrl, componentSettings.payload);
return (
<DatastoreProvider notificationService={notificationService} >
<Component />
</DatastoreProvider>
);