From 4bf5f6308689cda4c2628f2fffaa9adb86ee4e88 Mon Sep 17 00:00:00 2001 From: Richard Harris Date: Sat, 20 Apr 2019 16:26:10 -0400 Subject: [PATCH] huh, React yells if you use onInput instead of onChange --- site/content/blog/2019-04-20-write-less-code.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/site/content/blog/2019-04-20-write-less-code.md b/site/content/blog/2019-04-20-write-less-code.md index 226909259c..4f6007e175 100644 --- a/site/content/blog/2019-04-20-write-less-code.md +++ b/site/content/blog/2019-04-20-write-less-code.md @@ -57,18 +57,18 @@ export default () => { const [a, setA] = useState(1); const [b, setB] = useState(2); - function handleInputA(event) { + function handleChangeA(event) { setA(+event.target.value); } - function handleInputB(event) { + function handleChangeB(event) { setB(+event.target.value); } return (
- - + +

{a} + {b} = {a + b}

@@ -121,7 +121,7 @@ In Vue, your markup must be wrapped in a `