onclick state change
import React, { useState } from 'react';
import './App.css';
function App() {
const [state, setstate] = useState("halwa");
const content = () => setstate("halwa2");
return (
<div>
<h1>{state}</h1>
<button onClick={content}>change</button>
</div>
)
}
export default App