valtio

by pmndrs · Web

🧙 Valtio makes proxy-state simple for React and Vanilla

New0 ratings10,231 starsActive
WebDeveloper ToolTypeScriptJavaScript
Open project ↗↓ Download v2.3.2GitHub⚑ Report
valtio preview

About this project

npm install valtio makes proxy-state simple Wrap your state object Valtio turns the object you pass it into a self-aware proxy. Mutate from anywhere You can make changes to it in the same way you would to a normal js-object. React via useSnapshot Create a local snapshot that catches changes. Rule of thumb: read from snapshots in render function, otherwise use the source. The component will only re-render when the parts of the state you access have changed, it is render-optimized. Note for TypeScript users: Return type of useSnapshot can be too strict. The snap variable returned by useSnapshot is a (deeply) read-only object. Its type has readonly attribute,…

Technologies

TypeScriptJavaScriptCSSproxyreactmutable

Project health

Actively maintained
Last updateyesterday
Contributors97
Latest releasev2.3.2
Open issues & PRs7
LicenseMIT
On GitHubsince 2020

GitHub

10,231
stars
291
forks
97
contributors
7
open issues & PRs
TypeScript
language
yesterday
last commit
View on GitHub ↗All releases ↗

Reviews

out of 5 · 0 ratings
★★★★★
0%
★★★★
0%
★★★
0%
★★
0%
0%
Sign in to write a review
No reviews yet
Be the first to review valtio.

Built by

pmndrs
Imported from GitHub · not yet claimed on GitPalace
View developer pageSign in with GitHub to claim

Maintain pmndrs/valtio? Claiming verifies admin access through your GitHub account and gives you control of this listing.

You might also like