JSFiddle - React, Tailwind, and code Playground

by Josh Pullen

JavaScript

let calledSignals = [];

function createSignal(initialValue) {
	const get = () => {
  	
  }

	return [get, set];
}

function reactive(callback) {
	calledSignals = [];
  callback();
  
}

const [value, setValue] = createSignal(0);

setInterval(() => {
	setValue(value() + 1);
}, 500);

reactive(() => {
	console.log(value());
});