Getting Started
Last updated
Was this helpful?
Last updated
Was this helpful?
useink/notifications
is an extension of useink
that provides an opinionated state management system for tracking the changing status of a transaction. When you add a notification it will live until the configured time to live has expired then will automatically be removed from state. This is useful for temporarily displaying a notification then having it removed in the view. useink/notifications
does not contain any UI elements. It only tracks state. You can use this in combination with UI libraries or components of your choice.
You must first . useink/notifications
has its own import path in the
You must set moduleResolution
to nodenext
or bundler
. This feature allows your application to discover the useink/notifications
import paths defined in the useink package.json
.
Notification state management is not in useink by default. You must wrap your application with <NotificationsProvider>
.
If you want Notifications to live in state for ever, or until you remove them you can set the
See to learn about custom and default settings.