Skip to content

Add onRehydrate callback or isHydrated variableΒ #19

@ClayMav

Description

@ClayMav

Is your feature request related to a problem? Please describe.
I have been using a bespoke solution to this problem with the vanilla persist middleware and love this higher order approach, however, there is no onRehydrate callback so I can't check if hydration has occurred and if not, block rendering or show a loading screen. In your sample app, it briefly shows 0 before updating to the correct value which is undesirable.

Describe the solution you'd like
I would like to be able to somehow check if the store has hydrated yet.

Describe alternatives you've considered
I have though about how to solve this and don't see any concise way to do so.

Additional context
N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions