@solid-primitives/cookies-store

Primitive that manages browser cookies

Usage no npm install needed!

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

README

@solid-primitives/cookies

lerna

WARNING!: This primitive is deprecated in favour of the new/incoming Storage primitive. This package will be available but unmaintained.

A cookies storage facility.

createCookieStore - Handles creating and managing a single cookie action.

How to use it

const [value, setValue] = createCookieStore("my-cookie", "derp");
setValue("my-new-value");
console.log(value());

Demo

You may find a working example on CSB here: https://codesandbox.io/s/solid-create-cookie-store-uh192?file=/src/index.tsx

Changelog

Expand Changelog

0.0.100

Initial release.

1.1.3

Official release.

1.1.4

Patched incorrect use of serialize for the deserialize method.

1.1.5

Patched issue with deleting and added strinfication ability.

1.1.6

Fixed an issue with = in values