Skip to content

Fix create deep signal #781

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

Merged
merged 2 commits into from
Mar 27, 2025
Merged

Conversation

juanrgm
Copy link
Contributor

@juanrgm juanrgm commented Mar 26, 2025

The setter of createDeepSignal is not working if you pass a non-function value.

const [data, { mutate }] = createResource(() => ({ counter: 1 }), {
  storage: createDeepSignal,
});
// mutate(() => ({ counter: 2 })); // works
mutate({ counter: 2 }); // not working
createEffect(() => {
  console.log(data()?.counter); // 1
});

Copy link

changeset-bot bot commented Mar 26, 2025

🦋 Changeset detected

Latest commit: 9914bfc

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

This PR includes changesets to release 2 packages
Name Type
@solid-primitives/resource Patch
@solid-primitives/db-store 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

@atk atk merged commit 4af32ec into solidjs-community:main Mar 27, 2025
3 checks 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.

3 participants