Last active
October 15, 2022 13:58
-
-
Save el3um4s/43b3c019d993ad2ac43a6bc65e32fa81 to your computer and use it in GitHub Desktop.
MEDIUM - How To Show Notifications in Web Application - 03
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const notifications = { | |
// ... | |
send: (msg: Msg, id: string = idGenerator()) => { | |
notificationStore.update((n) => { | |
return [...n, { id, msg }]; | |
}); | |
}, | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment