Skip to content

Effortless, type-safe state management toolkit for building reactive, interactive SvelteKit apps with svstate and tRPC

Notifications You must be signed in to change notification settings

BCsabaEngine/svstate-kit

Repository files navigation

svstate-kit

Effortless state management for SvelteKit applications.

svstate-kit demo

Why svstate?

Stop wrestling with complex state management. svstate gives you reactive, type-safe state that just works.

  • Zero boilerplate — Wrap your data and go
  • Automatic reactivity — Changes propagate instantly
  • Built-in side effects — Computed values update automatically
  • Type-safe — Full TypeScript support out of the box

See It In Action

This demo showcases three ways to manage state in SvelteKit:

Approach Best For
SvelteKit Native Traditional form-based apps
tRPC Server Server-rendered pages
tRPC + svstate Interactive client-side apps

Quick Start

npm install svstate
import { createSvState } from 'svstate';

const state = createSvState(myData, {
	effect: ({ target }) => recalculate(target),
	action: async () => await saveToServer(state.data)
});

That's it. Your state is now reactive, tracked, and ready to save.

Learn More


Built with SvelteKit, tRPC, and Tailwind CSS.

About

Effortless, type-safe state management toolkit for building reactive, interactive SvelteKit apps with svstate and tRPC

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published