Skip to content

Commit a4f792d

Browse files
committed
fix: lesson 31
1 parent fd7908c commit a4f792d

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

lessons/lesson31/examples/useEffectPage/index.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ function UseEffectPage3({ userId = 2 }) {
4545
// Эффект, зависящий от userId
4646
useEffect(() => {
4747
if (!userId) return;
48-
setIsLoading(true)
48+
setIsLoading(true);
4949

5050
console.log("Сработаю при монтировании и изменении userId");
5151

lessons/lesson31/examples/useMemoPage/index.jsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,11 @@ function UseMemoPage() {
1717
const [filter, setFilter] = useState("all");
1818
const [counter, setCounter] = useState(0);
1919

20-
2120
return (
2221
<div style={{ padding: "20px" }}>
2322
<h1>useMemo</h1>
2423

25-
<button onClick={() => setCounter(c => c + 1)}>
24+
<button onClick={() => setCounter((count) => count + 1)}>
2625
Счётчик: {counter} (не влияет на TodoList!)
2726
</button>
2827

0 commit comments

Comments
 (0)