Skip to content

Could identify() also read from localStorage? #71

Open
@georgecrawford

Description

@georgecrawford

Hi there,

Firstly, thanks for this great service. It's working fantastically well for us.

We have an application which involves a fair bit of user state changing - logging in and out, setting different properties, etc. For each of these changes, we want to identify(user) to get the appropriate feature flags. I'm already bootstrapping from localStorage during initialize(), and I can's see a good reason why the identify() function doesn't also make use of this cache. I'd be happy if identify() used the last-known values from localStorage, whilst in the background loading the fresh values from the network, populating localStorage, and perhaps firing the change event if there's an update.

Could this work? I may well have missed something really obvious, so apologies!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions