Polyfire exposes a simple persistent key value store for each user of each project.

NOTE: The kv store only stores string. If you want to store something more complex, you can use JSON.stringify

💡 Example

To set a value:

// In React:
const { data: { kv } } = usePolyfire();
// In other environments:
const { data: { kv } } = polyfire;

await kv.set("my_key", "my_value");

The value can later be retieved with kv.get:

console.log(await kv.get("my_key")); // Should print "my_value"