Skip to content

svelte-runes-store is a svelte/sveltekit package to build (persistent) svelte stores using runes.

Notifications You must be signed in to change notification settings

joaquimnetocel/svelte-runes-store

Repository files navigation

svelte-runes-store

GITHUB VERSION NPM VERSION NPM Downloads NPM License Twitter

svelte-runes-store is a svelte/sveltekit package to build (persistent) svelte stores using runes.

GIF EXAMPLE

VERSIONS

  • WORKS WITH SVELTE 5 ONLY.

FEATURES

  • USES THE SVELTE 5 RUNES.
  • PERSISTENT AND NON PERSISTENT STORES.
  • TYPESCRIPT SUPPORT.

DEMOS

INSTALLATION

npm install svelte-runes-store

EXAMPLES

To run the examples from /src/routes:

git clone https://github.com/joaquimnetocel/svelte-runes-store.git
cd svelte-runes-store
npm install
npm run dev

COMPONENT STRUCTURE

  • functionCreateStore: Function to create the store.
  • functionReadStore: Function to read the store.

PARAMETERS

  • PROPS OF functionCreateStore:
PARAMETER DESCRIPTION TYPE REQUIRED DEFAULT
value INITIAL VALUE OF THE STORE. Generic YES -
name STORE NAME. string YES -
persistent PERSISTENT STORE (OR NOT). boolean NO false
storage STORAGE TYPE. localStorage OR sessionStorage NO localStorage
  • PROPS OF functionReadStore:
PARAMETER DESCRIPTION TYPE REQUIRED DEFAULT
name STORE NAME. string YES -

About

svelte-runes-store is a svelte/sveltekit package to build (persistent) svelte stores using runes.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published