function Button(){
// const handleClick = () => setCounter(counter*2);
return (
<button onClick={()=>{}}>
+1
</button>);
}
function Display(props){
return(
<div>{props.message}</div>);
}
function App(){
const [counter, setCounter] = useState(2);
return (
<>
<Button />
<Display message={counter}/>
</> );
}
ReactDOM.render(
<App />,
document.getElementById('mountNode')
);