Update (global) state outside of React: Jotai's store API
Technically, we're still in React just outside of its lifecycle.
Scenario
A Jotai atom that manages the app's notifications state.
export type Notification = {
id: string
type: 'info' | 'warning' | 'success' | 'error'
title: string
me...
contigen.hashnode.dev2 min read