Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

364
Views
How to solve localstorage exeeded the quota error in Reactjs

Regarding redux-localstorage-simple in React.js/Typescript, exceeded the quota error occured when trying to store a huge amount of data(It's actually an array of objects related to tilemap coordinate data). I'm sure it is because the local storage limit for a certain host has been exceeded.

Reloading the page initializes the redux storage, so I had to use the redux-localstorage-simple library to avoid data loss.

In this case, which alternative should I use to avoid exceeded the quota error?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Depends a bit on your application.

First off, did you check the filesize from the JSON payload? Especially in the context of tilemaps you may have huge polygon shapes with lots of details which exceed megabytes of data fast.

Do check the size of the JSON.stringify output which your localstorage library may use under the hood.

If storage is in fact a limitation, you could either upgrade to IndexedDB (which has a higher quota) or try to store only relevant keys and recreate missing properties when rehydrating the store.

I had a similar problem when storing big chunks of data and ended up using redux-offline which provides an IndexedDB adapter.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!