persist-web-storage
@reatom/persist adapter for the Web Storage APIs.
Installation
npm i @reatom/persist-web-storageUsage
There are two similar types adapters for each storage: withLocalStorage, withSessionStorage.
Simple example
import { atom } from '@reatom/framework'import { withLocalStorage } from '@reatom/persist-web-storage'
export const tokenAtom = atom('', 'tokenAtom').pipe(withLocalStorage('token'))