Sveltekit Ssr Store screenshot

Sveltekit Ssr Store

Author Avatar Theme by Devunt
Updated: 27 Jun 2023
43 Stars

A drop-in replacement for Svelte stores, safe to use with SvelteKit SSR.

Categories

Overview

The @svelte-kits/store is a library that serves as a drop-in replacement for Svelte stores. It is specifically designed to be safe for use with SvelteKit SSR. With this library, users can safely use shared stores in their SvelteKit apps without worrying about state leakage between requests.

Features

  • Drop-in Replacement: @svelte-kits/store can be easily used as a replacement for svelte/store in existing code.
  • Safe for SvelteKit SSR: The modified stores in this library are isolated for each request, ensuring the security of shared state between components.
  • Identical API: All original svelte stores are available and can be used with the same API.

Installation

To install @svelte-kits/store, use your favorite package manager and run the following command:

npm install @svelte-kits/store

Summary

The @svelte-kits/store is a library that provides a safe solution for using shared stores with SvelteKit SSR. By offering modified stores that are isolated to each request, this library eliminates the risk of state leakage between requests. With a drop-in replacement for svelte stores and an identical API, @svelte-kits/store is a convenient choice for SvelteKit developers. Contributions to the library are also welcomed.