Using localStorage is great for storing simple user preferences such as the expanded/collapsed state of a sidebar, or the light/dark theme preference for the site. An often overlooked but useful feature of localStorage is the ability to sync changes between open tabs.
Bits and bytes of code
Bytes is my collection of short-form posts, tips, and things I learn as I build software.
Loading...