Getting Started
Notifications
Installation
Configure tsconfig.json
{
"compilerOptions": {
"moduleResolution": "nodenext", // or `bundler`
}
}Add NotificationsProvider
import { NotificationsProvider } from 'useink/notifications'
const FIVE_SECONDS = 5000
const HALF_A_SECOND = 500
function App({ children }) {
return (
<NotificationsProvider config={{
expiration: FIVE_SECONDS, // default. This can be omitted
checkInterval: : HALF_A_SECOND, // default. This can be omitted
}}>
<MyRoutes />
</NotificationsProvider>
)
}
export default AppConfiguring Notifications
Last updated