diff --git a/src/App.jsx b/src/App.jsx index cf446fa..d973d7f 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -2,26 +2,27 @@ import styles from './styles/App.module.scss' import React, { useState, useCallback } from 'react' function Parent() { - const names = ['Alex','Bob','Deniel']; - const handleNameClick = useCallback( name => { - alert(`Вы нажали на ${name}`); + const [text,setText] = useState('') + + const handlerChange = useCallback( event => { + setText(event.target.value); },[]); + return ( <> -
Вы ввели текст: {text}
+