Skip to content

Commit

Permalink
Fix: Mithril typos (#209)
Browse files Browse the repository at this point in the history
  • Loading branch information
entibo committed Dec 27, 2023
1 parent dcea146 commit 20494fd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion content/4-component-composition/5-context/mithril/App.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import m from "mithril";
import UserProfile from "./UserProfile.jsx";
import UserProfile from "./UserProfile";

export default function App() {
// In a real app, you would fetch the user data from an API
Expand Down
4 changes: 2 additions & 2 deletions content/6-form-input/2-checkbox/mithril/IsAvailable.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import m from "mithril";

export default function IsAvailable() {
let isAvailable = false;
const onUpdate = (isAvailable = !isAvailable);
const onUpdate = () => (isAvailable = !isAvailable);

return {
view: () =>
Expand All @@ -13,7 +13,7 @@ export default function IsAvailable() {
id: "is-available",
type: "checkbox",
checked: isAvailable,
onChange: onUpdate,
onchange: onUpdate,
}),
m("label", { for: "is-available" }, "Is available")
),
Expand Down

0 comments on commit 20494fd

Please sign in to comment.