Skip to content
This repository has been archived by the owner on Sep 17, 2024. It is now read-only.

Commit

Permalink
Merge pull request #264 from wutania/patch-1
Browse files Browse the repository at this point in the history
Update correct solution
  • Loading branch information
davedbase authored Oct 9, 2023
2 parents a2342eb + 23d28ea commit 5a4469b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion langs/en/tutorials/reactivity_on/solved.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"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"
"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 => a + 1)}>Increment A</button>\n <button onClick={() => setB(b => b + 1)}>Increment B</button>\n </>\n};\n\nrender(App, document.getElementById(\"app\"));\n"
}
]
}

0 comments on commit 5a4469b

Please sign in to comment.