From 2c028c02ae55f6668129cb58cfa9dfadc92e3d87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Feje=C5=A1?= Date: Wed, 12 Dec 2018 10:47:23 +0100 Subject: [PATCH] update input to use destructuring --- snippets/Input.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/snippets/Input.md b/snippets/Input.md index aab046860..91c14c452 100644 --- a/snippets/Input.md +++ b/snippets/Input.md @@ -8,12 +8,12 @@ Render an `` element with the appropriate attributes and use the `callbac ```jsx function Input ({ callback, type = 'text', disabled = false, readOnly = false, placeholder = '' }) { return ( - callback(event.target.value)} + onChange={({ target: { value }}) => callback(value)} /> ); }