DEV Community

Discussion on: Persistent State in React

Collapse
 
alirezavalizade profile image
alireza valizade

Yes, exactly my pointe was it's not for saving huge data, better to use do not that on each render or change or even better to use IndexedDB, Check this out it's an example of blocking the ui by localStorage,
codepen.io/SitePoint/pen/GzLPJV

Thread Thread
 
jamesthomson profile image
James Thomson • Edited

Well, if anything, that actually proves how capable writing to localStorage can be. The fact that it can write 100,000 entries in less than 500ms is pretty impressive. Nonetheless, each use case has its ideal solution. I wouldn’t rule out this method because of an over amplified scenario such as writing 100,000 entries to localStorage