Skip to content

Does it solve a problem of crazy re-rendering on any state change #23

@NetLancer

Description

@NetLancer

Hi @mweststrate and thanks for the invention, looks cute :)).
My case is, trying to implement following logic:
On webpage load first see if my localStorage contains the needed information,
and if so - fine, use it. Else - apiFetch it, use and also save it in localStorage for subsequent use.
The information amount's not very small but rarely changes (why i want localStorage)
I need some kinda intermediate storage (on frontend) which possibly less memory consuming and does not cause page re-render on any state change in the background like useState does (or did, based on my stale react knowledge :)).
(By the way, i'm using react fullstack framework with graphql & prisma).
The idea is to store some amount of information from (localStorage | apiCall) at any given moment,
and the UI will depend on that store.
Would it be a suitable solution ?
Thanx a lot ))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions