@solid-primitives/local-store

Primitive to access localStorage, sessionStorage etc.

Usage no npm install needed!

<script type="module">
  import solidPrimitivesLocalStore from 'https://cdn.skypack.dev/@solid-primitives/local-store';
</script>

README

@solid-primitives/local-store

lerna

Creates a general local storage handler for LocalStorage, SessionStorage or your own engine.

createLocalStore - A single primitive can handle localStorage and localSession.

How to use it

const [value, setValue] = createStorage("app");
setValue("foo", "bar");
console.log(value.foo);

Demo

You may view a working example here: https://codesandbox.io/s/solid-primitives-local-store-6wc4c?file=/src/index.tsx

Changelog

Expand Changelog

0.0.100

First developed commit.

1.1.4

Added ability to stringify storage.