<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
This Pen doesn't use any external CSS resources.