valtio

💊 Valtio makes proxy-state simple for React and Vanilla

MIT License

Downloads
1.9M
Stars
8.5K
Committers
84

Bot releases are hidden (Show)

valtio - v1.13.2 Latest Release

Published by dai-shi 8 months ago

It should improve the compatibility with old browsers.

What's Changed

Full Changelog: https://github.com/pmndrs/valtio/compare/v1.13.1...v1.13.2

valtio - v1.13.1

Published by dai-shi 8 months ago

A small improvement in types.

What's Changed

New Contributors

Full Changelog: https://github.com/pmndrs/valtio/compare/v1.13.0...v1.13.1

valtio - v1.13.0

Published by dai-shi 10 months ago

We have a new valtio-history package!

What's Changed

New Contributors

Full Changelog: https://github.com/pmndrs/valtio/compare/v1.12.1...v1.13.0

valtio - v1.12.1

Published by dai-shi 11 months ago

Some improvements in valtio/utils.

What's Changed

New Contributors

Full Changelog: https://github.com/pmndrs/valtio/compare/v1.12.0...v1.12.1

valtio - v1.12.0

Published by dai-shi 12 months ago

This version moves derive to a dependency. Please open a new discussion if you find some problems.

What's Changed

New Contributors

Full Changelog: https://github.com/pmndrs/valtio/compare/v1.11.3...v1.12.0

valtio - v1.11.3

Published by dai-shi 12 months ago

This fixes some edge cases.

What's Changed

New Contributors

Full Changelog: https://github.com/pmndrs/valtio/compare/v1.11.2...v1.11.3

valtio - v1.11.2

Published by dai-shi about 1 year ago

This improves some TypeScript issues.

What's Changed

New Contributors

Full Changelog: https://github.com/pmndrs/valtio/compare/v1.11.1...v1.11.2

valtio - v1.11.1

Published by dai-shi about 1 year ago

This reverts the change made in v1.11.0, which turns out to be troublesome for RN users.

It's basically the same as v1.10.7.

diff --git a/src/vanilla.ts b/src/vanilla.ts
index dc19c87..86faef8 100644
--- a/src/vanilla.ts
+++ b/src/vanilla.ts
@@ -60,7 +60,7 @@ type ProxyState = readonly [
   target: object,
   ensureVersion: (nextCheckVersion?: number) => number,
   createSnapshot: CreateSnapshot,
-  addListener: AddListener
+  addListener: AddListener,
 ]
 
 // shared state
diff --git a/src/vanilla/utils/derive.ts b/src/vanilla/utils/derive.ts
index 832f542..c9af01a 100644
--- a/src/vanilla/utils/derive.ts
+++ b/src/vanilla/utils/derive.ts
@@ -16,7 +16,7 @@ type SourceObjectEntry = [
   subscriptions: Set<Subscription>,
   unsubscribe: () => void,
   pendingCount: number,
-  pendingCallbacks: Set<() => void>
+  pendingCallbacks: Set<() => void>,
 ]
 
 type DerivedObjectEntry = [subscriptions: Set<Subscription>]
diff --git a/src/vanilla/utils/proxyWithComputed.ts b/src/vanilla/utils/proxyWithComputed.ts
index 076d11b..f6d47a2 100644
--- a/src/vanilla/utils/proxyWithComputed.ts
+++ b/src/vanilla/utils/proxyWithComputed.ts
@@ -8,7 +8,7 @@ import type { INTERNAL_Snapshot as Snapshot } from '../../vanilla.ts'
  */
 export function proxyWithComputed_DEPRECATED<
   T extends object,
-  U extends object
+  U extends object,
 >(
   initialObject: T,
   computedFns: {

What's Changed

Full Changelog: https://github.com/pmndrs/valtio/compare/v1.11.0...v1.11.1

valtio - v1.11.0

Published by dai-shi about 1 year ago

This adds a new behavior to trap defineProperty for certain cases.

What's Changed

New Contributors

Full Changelog: https://github.com/pmndrs/valtio/compare/v1.10.7...v1.11.0

valtio - v1.10.7

Published by dai-shi over 1 year ago

Some improvements for edge cases.

What's Changed

New Contributors

Full Changelog: https://github.com/pmndrs/valtio/compare/v1.10.6...v1.10.7

valtio - v1.10.6

Published by dai-shi over 1 year ago

It comes with some improvements.

What's Changed

New Contributors

Full Changelog: https://github.com/pmndrs/valtio/compare/v1.10.5...v1.10.6

valtio - v1.10.5

Published by dai-shi over 1 year ago

This may improve performance in some edge cases.

What's Changed

New Contributors

Full Changelog: https://github.com/pmndrs/valtio/compare/v1.10.4...v1.10.5

valtio - v1.10.4

Published by dai-shi over 1 year ago

The first one is a small improvement/fix. The second one is hoping to to support Deno, but unconfirmed.

What's Changed

New Contributors

Full Changelog: https://github.com/pmndrs/valtio/compare/v1.10.3...v1.10.4

valtio - v1.10.3

Published by dai-shi over 1 year ago

v1.10.1 had a regression in some edge cases, which is fixed in this version.

What's Changed

New Contributors

Full Changelog: https://github.com/pmndrs/valtio/compare/v1.10.2...v1.10.3

valtio - v1.10.2

Published by dai-shi over 1 year ago

v1.10.1 has a performance issue in some cases. This should fix it.

What's Changed

Full Changelog: https://github.com/pmndrs/valtio/compare/v1.10.1...v1.10.2

valtio - v1.10.1

Published by dai-shi over 1 year ago

This version contains some small fixes and internal improvements.

What's Changed

New Contributors

Full Changelog: https://github.com/pmndrs/valtio/compare/v1.10.0...v1.10.1

valtio - v1.10.0

Published by dai-shi over 1 year ago

This version fixes an issue in edge cases. It also deprecates proxyWithComputed in favor of bare object getters.

What's Changed

New Contributors

Full Changelog: https://github.com/pmndrs/valtio/compare/v1.9.0...v1.10.0

valtio - v1.9.0

Published by dai-shi almost 2 years ago

This deprecates useProxy macro and adds new useProxy util, which is a convenient React hook to avoid misusing proxy states and snapshots.

What's Changed

Full Changelog: https://github.com/pmndrs/valtio/compare/v1.8.2...v1.9.0

valtio - v1.8.2

Published by dai-shi almost 2 years ago

This includes a small fix and a small improvement.

What's Changed

New Contributors

Full Changelog: https://github.com/pmndrs/valtio/compare/v1.8.0...v1.8.2

valtio - v1.8.0

Published by dai-shi almost 2 years ago

This version adds no new features, but the internal code is changed a lot. Thus, minor bump.

What's Changed

Full Changelog: https://github.com/pmndrs/valtio/compare/v1.7.6...v1.8.0

Package Rankings
Top 0.81% on Npmjs.org
Top 6.74% on Proxy.golang.org
Top 14.93% on Deno.land
Badges
Extracted from project README
Build Status Build Size Version Downloads Discord Shield
Related Projects