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

Commit

Permalink
Update solved.json
Browse files Browse the repository at this point in the history
The existing solution returns `fn is not a function` in the repl console. By updating this it fixes it!
  • Loading branch information
wutania authored Jul 11, 2023
1 parent 891ef27 commit 23d28ea
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 23d28ea

Please sign in to comment.