From 7f995398f4cfffe9132341d4380b716d65d3a214 Mon Sep 17 00:00:00 2001 From: beet <63141491+beetcb@users.noreply.github.com> Date: Sun, 7 Nov 2021 11:31:17 +0800 Subject: [PATCH] Fix alternative solution to add and remove a CSS class (#4027) (#4072) * Fix alternative solution to add and remove a CSS class (#4027) * Update reacting-to-input-with-state.md Co-authored-by: Dan Abramov --- beta/src/pages/learn/reacting-to-input-with-state.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/beta/src/pages/learn/reacting-to-input-with-state.md b/beta/src/pages/learn/reacting-to-input-with-state.md index 1873d699..91e8e7c6 100644 --- a/beta/src/pages/learn/reacting-to-input-with-state.md +++ b/beta/src/pages/learn/reacting-to-input-with-state.md @@ -633,6 +633,7 @@ export default function Picture() { className="picture picture--active" alt="Rainbow houses in Kampung Pelangi, Indonesia" src="https://i.imgur.com/5qwVYb1.jpeg" + onClick={e => e.stopPropagation()} /> ); @@ -1215,4 +1216,4 @@ The `updateDOM` function you wrote shows what React does under the hood when you - \ No newline at end of file +