Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: static-store setValue with setterFn has correct arguments #734

Merged
merged 2 commits into from
Jan 10, 2025

Conversation

derekrjones
Copy link
Contributor

if a key is not listened to, setValue on that key incorrectly wraps the prev value in an array when passed as argument to a setterFn

const [state, setState] = createStaticStore({a: 1});
setState('a', prev => prev + 1); // prev is `[1]`, should be `1`

- if a key is not listened to, setValue on that key was wrapping the prev value in an array when passed as argument to a setterFn
Copy link

changeset-bot bot commented Jan 10, 2025

🦋 Changeset detected

Latest commit: 56d9511

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 8 packages
Name Type
@solid-primitives/static-store Patch
@solid-primitives/audio Patch
@solid-primitives/bounds Patch
@solid-primitives/geolocation Patch
@solid-primitives/media Patch
@solid-primitives/mouse Patch
@solid-primitives/resize-observer Patch
@solid-primitives/scroll Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@thetarnav thetarnav merged commit 415064d into solidjs-community:main Jan 10, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants