var lesson = {
	files: [
		{
			name: "main",
			content: "import { render } from \"solid-js/web\";\nimport { createSignal, createEffect, on } from \"solid-js\";\n\nconst App = () => {\n  const [a, setA] = createSignal(1);\n  const [b, setB] = createSignal(1);\n\n  createEffect(() => {\n    console.log(a(), b());\n  });\n\n  return <>\n    <button onClick={() => setA(a() + 1)}>Increment A</button>\n    <button onClick={() => setB(b() + 1)}>Increment B</button>\n  </>\n};\n\nrender(App, document.getElementById(\"app\"));\n"
		}
	]
};
var solved = {
	files: [
		{
			name: "main",
			content: "import { render } from \"solid-js/web\";\nimport { createSignal, createEffect, on } from \"solid-js\";\n\nconst App = () => {\n  const [a, setA] = createSignal(1);\n  const [b, setB] = createSignal(1);\n\n  createEffect(on(a, (a) => {\n    console.log(a, b());\n  }, { defer: true }));\n\n  return <>\n    <button onClick={() => setA(a() + 1)}>Increment A</button>\n    <button onClick={() => setB(b() + 1)}>Increment B</button>\n  </>\n};\n\nrender(App, document.getElementById(\"app\"));\n"
		}
	]
};
var markdown = "For convenience, Solid has an `on` helper that enables setting explicit dependencies for our computations. This is mostly used as a terse way to be even more explicit about which Signals are tracked (and not track any other Signals, even if they are read). In addition, `on` provides a `defer` option that allows the computation not to execute immediately and only run on first change.\n\nLet's have our Effect run only when `a` updates, and defer execution until the value changes:\n\n```js\ncreateEffect(on(a, (a) => {\n  console.log(a, b());\n}, { defer: true }));\n```\n";
var reactivity_on = {
	lesson: lesson,
	solved: solved,
	markdown: markdown
};

export { reactivity_on as default, lesson, markdown, solved };
