const cardProps = { title: "Card Title", content: "Hello World" };
const App = () => {
return (
<Card
title={cardProps.title}
content={cardProps.content}
/>
);
};
Simpler way to do this:
const cardProps = { title: "Card Title", content: "Hello World" };
const App = () => {
return <Card {...cardProps} />;
};
Top comments (0)