'Memory Slowness issue with React Context and lot of data
I have a simple react app that load some external pdf page from api Api send me result from page 1 its an array of all text of page sometimes there is 3000 text
{
texts: [{ value: 'Title of page'}, {value:"Chapter 1"} ......
}
Render works good but after loading 50 pages my store is very heavy i have 3000 texts * 50 pages store in my context
I try to clean store to keep only last 10 pages but when i go back to page 1 i need to refetch the page and store it again in context
Do you have a solution other than context to avoid this performance issue (page lag when i scroll down to load another page) ?
Thanks
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
