404kacper / 404kacper/RAN-logger
LogsState - context api - preferences
- Vorherrschende Sprache
- TypeScript
- Sterne
- 0
- Forks
- 0
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
With current implementation, whenever preferences are checked true to false they will remove all of logs data from storage (caused by re-render of LogsState due to preferences state dispatch/update) - to solve that different Context provider say PreferencesState is needed that will be wrapped by LogsState so that it's updates aren't impacting renders of LogsState that is an expensive operation when files will reach sizes of +20MB.
Way in which logs are added to local storage is as follows:
file dropped --> promises resolve causing state to update -> each update to logs causes useEffect in files to overwrite values in local storage with current state.logs (except for initial render since it's only fetching)
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Bewertung
Dieses Issue wurde noch nicht bewertet.