<div id="root"></div>
function App() {
  const [text, setText] = React.useState('');
  return (
    <div>
      <input type="text" value={text} placeholder="Кликай на кнопку!" />
      <div>
        <button onClick={function() {
            setText("😍");
          }}>😍</button>
        <button onClick={function() {
            setText("😡");
          }}>😡</button>
        <button onClick={function() {
            setText("😭");
          }}>😭</button>
      </div>
    </div>
  );
}

ReactDOM.render(<App/>, document.getElementById('root'));
View Compiled

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

  1. https://cdnjs.cloudflare.com/ajax/libs/react/16.13.1/umd/react.production.min.js
  2. https://cdnjs.cloudflare.com/ajax/libs/react-dom/16.13.1/umd/react-dom.production.min.js