week6.1 memo, card-wrapper
//create a code which random numbers //rerandring Ugly Way* //This will reRendering whole body which is not necacery import { useState } from 'react' import './App.css' function App() { const [count, setCount] = useState(0) const [title, setTitle] = useState("dhrup") const updateTitle = () => { setTitle("my title is " + Math.random()*100); } return ( <> <button onClick={updateTitle}>Update the title</button> <Header title={title}></Header> <Header title="hark2">my name is dhurp</Header> </> ) } function Header({title}) { return <div> {title} </div> } export default App