💊 Valtio makes proxy-state simple for React and Vanilla
MIT License
Bot releases are hidden (Show)
It should improve the compatibility with old browsers.
Full Changelog: https://github.com/pmndrs/valtio/compare/v1.13.1...v1.13.2
Published by dai-shi 8 months ago
A small improvement in types.
Snapshot<T>
use read-only collections by @cAttte in https://github.com/pmndrs/valtio/pull/850
Full Changelog: https://github.com/pmndrs/valtio/compare/v1.13.0...v1.13.1
Published by dai-shi 10 months ago
We have a new valtio-history package!
Full Changelog: https://github.com/pmndrs/valtio/compare/v1.12.1...v1.13.0
Published by dai-shi 11 months ago
Some improvements in valtio/utils.
Full Changelog: https://github.com/pmndrs/valtio/compare/v1.12.0...v1.12.1
Published by dai-shi 12 months ago
This version moves derive to a dependency. Please open a new discussion if you find some problems.
Full Changelog: https://github.com/pmndrs/valtio/compare/v1.11.3...v1.12.0
Published by dai-shi 12 months ago
This fixes some edge cases.
Full Changelog: https://github.com/pmndrs/valtio/compare/v1.11.2...v1.11.3
Published by dai-shi about 1 year ago
This improves some TypeScript issues.
Full Changelog: https://github.com/pmndrs/valtio/compare/v1.11.1...v1.11.2
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: {
Full Changelog: https://github.com/pmndrs/valtio/compare/v1.11.0...v1.11.1
Published by dai-shi about 1 year ago
This adds a new behavior to trap defineProperty
for certain cases.
Full Changelog: https://github.com/pmndrs/valtio/compare/v1.10.7...v1.11.0
Published by dai-shi over 1 year ago
Some improvements for edge cases.
Full Changelog: https://github.com/pmndrs/valtio/compare/v1.10.6...v1.10.7
Published by dai-shi over 1 year ago
It comes with some improvements.
Full Changelog: https://github.com/pmndrs/valtio/compare/v1.10.5...v1.10.6
Published by dai-shi over 1 year ago
This may improve performance in some edge cases.
Full Changelog: https://github.com/pmndrs/valtio/compare/v1.10.4...v1.10.5
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.
Full Changelog: https://github.com/pmndrs/valtio/compare/v1.10.3...v1.10.4
Published by dai-shi over 1 year ago
v1.10.1 had a regression in some edge cases, which is fixed in this version.
Full Changelog: https://github.com/pmndrs/valtio/compare/v1.10.2...v1.10.3
Published by dai-shi over 1 year ago
v1.10.1 has a performance issue in some cases. This should fix it.
Full Changelog: https://github.com/pmndrs/valtio/compare/v1.10.1...v1.10.2
Published by dai-shi over 1 year ago
This version contains some small fixes and internal improvements.
Full Changelog: https://github.com/pmndrs/valtio/compare/v1.10.0...v1.10.1
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.
__DEV__
with ts-jest by @dai-shi in https://github.com/pmndrs/valtio/pull/643
Full Changelog: https://github.com/pmndrs/valtio/compare/v1.9.0...v1.10.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.
Full Changelog: https://github.com/pmndrs/valtio/compare/v1.8.2...v1.9.0
Published by dai-shi almost 2 years ago
This includes a small fix and a small improvement.
Full Changelog: https://github.com/pmndrs/valtio/compare/v1.8.0...v1.8.2
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.
Full Changelog: https://github.com/pmndrs/valtio/compare/v1.7.6...v1.8.0