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

fromStore() in combination with $derived seems broken #14002

Closed
brunnerh opened this issue Oct 28, 2024 · 1 comment · Fixed by #14005
Closed

fromStore() in combination with $derived seems broken #14002

brunnerh opened this issue Oct 28, 2024 · 1 comment · Fixed by #14005
Assignees
Labels

Comments

@brunnerh
Copy link
Member

Describe the bug

$derived values based on an object created by fromStore() do not seem to update.

Found by @dusty-phillips (see #13998).

Reproduction

class ThemeState {
  #storeState = fromStore(store)
  value = $derived(this.#storeState.current) // does not update
}

Full reproduction playground

I tried using $derived.by and a plain JS object instead of a class, neither change seemed to have any effect.

Sync via $effect works.

Logs

No response

System Info

REPL

Severity

annoyance

@trueadm trueadm added the bug label Oct 28, 2024
@trueadm trueadm self-assigned this Oct 28, 2024
@trueadm
Copy link
Contributor

trueadm commented Oct 28, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants