Skip to content

Allow custom storage implementation #50

@ybentz

Description

@ybentz

Hey,

My company is planning on starting to use Amplitude's experiments feature via this library. We're already using MMKV as our storage solution and would much prefer not to have to add yet another storage dependency just for this library to work (adds bloat, may lead to bugs, etc).
I saw that there's an existing (closed) issue from 2023 that asked to switch to MMKV and the discussion shifted towards what I think is the best and most common solution to expose the storage interface for consumers to be able to override.

I believe this would benefit most consumers of this library and I can give a few examples for open source libraries that already do the same:

  • Better-auth.
  • react-query with their a/sync storage persister. Here's an example from the MMKV docs for how it works. They have very similar examples there for other popular libraries like redux, mobx, etc.

I'm not sure why the poster of the existing issue closed it, can you please reconsider adding this custom storage interface?

Thank you!

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