
Security News
OpenCode User Hit with Hostile Backlash After Reporting Free AI Loophole
An OpenCode user faced harassment after reporting a free AI usage loophole, drawing a bitter backlash in a GitHub thread that has since been deleted.
@solid-primitives/trigger
Advanced tools
A set of primitives based on signals, used to trigger computations.
A set of primitives based on Solid signals, used to trigger computations.
createTrigger - Set listeners in reactive computations and then trigger them when you want.createTriggerCache - Creates a cache of triggers that can be used to mark dirty only specific keys.npm install @solid-primitives/trigger
# or
yarn add @solid-primitives/trigger
# or
pnpm add @solid-primitives/trigger
createTriggerSet listeners in reactive computations and then trigger them when you want.
import { createTrigger } from "@solid-primitives/trigger";
const [track, dirty] = createTrigger();
createEffect(() => {
track();
// ...
});
// later
dirty();
createTriggerCacheCreates a cache of triggers that can be used to mark dirty only specific keys.
Cache is a Map or WeakMap depending on the mapConstructor argument. (default: Map)
If mapConstructor is WeakMap then the cache will be weak and the keys will be garbage collected when they are no longer referenced.
Trigger signals added to the cache only when tracked under a computation, and get deleted from the cache when they are no longer tracked.
track and dirty are called with a key so that each tracker will trigger an update only when his individual key would get marked as dirty.
import { createTriggerCache } from "@solid-primitives/trigger";
const map = createTriggerCache<number>();
createEffect(() => {
map.track(1);
// ...
});
// later
map.dirty(1);
// this won't cause an update:
map.dirty(2);
dirtyAll will trigger all keys in the cache.
const [track, _dirty, dirtyAll] = createTriggerCache<number>();
createEffect(() => {
track(1);
// ...
});
// later (will trigger the update)
dirtyAll();
createTriggerCache constructor can take a WeakMap constructor as an argument. This will create a WeakMap of triggers instead of a Map.
const map = createTriggerCache<object>(WeakMap);
const obj = {};
createEffect(() => {
map.track(obj);
// ...
});
// later
map.dirty(obj);
See CHANGELOG.md
FAQs
A set of primitives based on Solid signals, used to trigger computations.
The npm package @solid-primitives/trigger receives a total of 0 weekly downloads. As such, @solid-primitives/trigger popularity was classified as not popular.
We found that @solid-primitives/trigger demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.

Security News
An OpenCode user faced harassment after reporting a free AI usage loophole, drawing a bitter backlash in a GitHub thread that has since been deleted.

Threat Research
/Security News
319 browser extensions installed by 13.4 million users hijack searches, capture queries, and collect referral payments from Yahoo and Bing.

Threat Research
Malicious Firefox extensions mimic Phantom, Jupiter, and Bitget wallets to steal recovery phrases and private keys, with one fetching its payload remotely.