You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Good afternoon. Tell me please. In my react application, I use useNotificationCenter - that is, your Notification Center. But I need that after refreshing the page (F5) the data is not reset. I tried to do it through localStorage, but when the page is updated, notifications are still reset, because. const { notifications } = useNotificationCenter(). If I do this: const { notifications } = useNotificationCenter(JSON.parse(localStorage.getItem('notifications'))), then it still doesn't work. How can I store all notifications in localStorage correctly?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Good afternoon. Tell me please. In my react application, I use useNotificationCenter - that is, your Notification Center. But I need that after refreshing the page (F5) the data is not reset. I tried to do it through localStorage, but when the page is updated, notifications are still reset, because. const { notifications } = useNotificationCenter(). If I do this: const { notifications } = useNotificationCenter(JSON.parse(localStorage.getItem('notifications'))), then it still doesn't work. How can I store all notifications in localStorage correctly?
Beta Was this translation helpful? Give feedback.
All reactions