From c78953bed6a9ef0dcea25bd9f8ebf3de4f718f5a Mon Sep 17 00:00:00 2001
From: Mitchell139 <50130291+Mitchell139@users.noreply.github.com>
Date: Tue, 21 Oct 2025 23:49:42 +1000
Subject: [PATCH] Improve function naming
---
1-exercise-solutions/lesson-04/4b.html | 4 ++--
1-exercise-solutions/lesson-04/4c.html | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/1-exercise-solutions/lesson-04/4b.html b/1-exercise-solutions/lesson-04/4b.html
index cb3e6c3..20fe0bf 100644
--- a/1-exercise-solutions/lesson-04/4b.html
+++ b/1-exercise-solutions/lesson-04/4b.html
@@ -24,7 +24,7 @@
function App() {
const [isButtonOn, setIsButtonOn] = React.useState(true);
- function switchButtonOn() {
+ function toggleButton() {
// Another solution is: setIsButtonOn(!isButtonOn);
if (isButtonOn) {
setIsButtonOn(false);
@@ -36,7 +36,7 @@
return (
diff --git a/1-exercise-solutions/lesson-04/4c.html b/1-exercise-solutions/lesson-04/4c.html
index 68d5ac3..a24317a 100644
--- a/1-exercise-solutions/lesson-04/4c.html
+++ b/1-exercise-solutions/lesson-04/4c.html
@@ -33,7 +33,7 @@
function App() {
const [isButtonOn, setIsButtonOn] = React.useState(true);
- function switchButtonOn() {
+ function toggleButton() {
if (isButtonOn) {
setIsButtonOn(false);
} else {
@@ -48,7 +48,7 @@
return (