Interesting stuff, using local storage is so powerful.
I took this principle a little further in a post a wrote a while ago. I needed to listen internally local storage change so I made a storage hook that comes with its own listening style system. The multi-tab stuff was a happy accident I leaned into.
Here's a basic demo and here's the article I wrote about it in.
Your useLocalStorage custom hook written in Typescript is very interesting, congrats!
LocalStorage is really powerfull, but I have noticed that in cases with a lot of changes happening at the same time, the performance is poor, due to the excessive usage of JSON.parse and JSON.stringify. I started some tests with IndexedDB and maybe it can handle this scenario better than localStorage.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Interesting stuff, using local storage is so powerful.
I took this principle a little further in a post a wrote a while ago. I needed to listen internally local storage change so I made a storage hook that comes with its own listening style system. The multi-tab stuff was a happy accident I leaned into.
Here's a basic demo and here's the article I wrote about it in.
React: Custom hook for accessing storage
Andrew Bone ・ Apr 21 '21 ・ 8 min read
Your useLocalStorage custom hook written in Typescript is very interesting, congrats!
LocalStorage is really powerfull, but I have noticed that in cases with a lot of changes happening at the same time, the performance is poor, due to the excessive usage of JSON.parse and JSON.stringify. I started some tests with IndexedDB and maybe it can handle this scenario better than localStorage.