Open
Conversation
This was
linked to
issues
Apr 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rewrite Charm using the alien-signals reactive algorithm.
Why?
Adopting alien-signals brings benefits and guarantees like predictable effect ordering, nested effect cleanup, and more efficient
computed()memoization, all without a significant compromise to performance. Building Charm on this signal algorithm should improve Charm's overall efficiency and reliability.What's New?
signal(initialValue): create a state container with a separate getter and setter functioneffectScope(fn): cleans up a group of effects and subscriptionsonCleanup(fn): runsfnonce the current effect/scope reruns or gets disposedlisten(selector, listener): similar tosubscribe(), but runs once immediatelyreactive(object): makes a mutable table deeply reactiveuntracked(fn): similar topeek(), but doesn't track effects created insidetrigger(getter): manually triggers an update in one or more signalsmapped()to cache values and avoid unnecessary updatescomputed()to use lazy evaluation instead of eager updatesBreaking Changes
peek()was changed tountracked()for parity with other state managersobserve(), which wraps observer calls in an effect scope.untracked(), so inner effects created in the listener are not tracked.untracked()or create a detached effect scope if you need to run code outside the parent effect's lifecycle.observe()now automatically dispose when the item is removedNotes
flags.strict: Formerly_G.__DEV__, this bans unsafe yielding and enables additional checks in Charm Sync.flags.frozen: Deep-freeze all atom values to enforce immutable state updates.