Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Proxy-state with valtio.

License

NotificationsYou must be signed in to change notification settings

wobsoriano/sveltio

Repository files navigation

npm (tag)npm bundle sizeNPM

State management solution for Svelte using proxies. Powered byvaltio.

Installation

pnpm add valtio sveltio

Usage

// store.tsimport{proxy}from'sveltio'exportconststate=proxy({count:0})

Read from snapshots, mutate the source.

<scriptlang="ts">import {useSnapshot }from'sveltio'import {state }from'./store'const snap=useSnapshot(state)</script><buttonon:click={()=>state.count++}>  Clicks: {$snap.count}</button>

For more info on how to usevaltio, check out the officialdocs.

License

MIT

About

Proxy-state with valtio.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors2

  •  
  •  

[8]ページ先頭

©2009-2025 Movatter.jp