const Banner = ({ name }) => {
return <div>Hello {name}</div>
}
function App() {
return (
<div>
<Banner />
</div>
)
}
Banner.defaultProps = {
name: "user",
}
export default App
const Banner = ({ name = "user" }) => {
return <div>Hello {name}</div>
}
function App() {
return (
<div>
<Banner />
</div>
)
}
export default App