Skip to content

Instantly share code, notes, and snippets.

@ColtHands
ColtHands / reactive.js
Created September 11, 2023 11:07 — forked from 1Marc/reactive.js
Vanilla Reactive System
// Credit Ryan Carniato https://frontendmasters.com/courses/reactivity-solidjs/
let context = [];
export function untrack(fn) {
const prevContext = context;
context = [];
const res = fn();
context = prevContext;
return res;