-
What do props help us accomplish? Make a component more reusable.
-
How do you pass a prop into a component?
-
Can I pass a custom prop (e.g.
blahblahblah={true}
) to a native DOM element? (e.g.) Why or why not? No, because the JSX we use to describe native DOM elements will be turned into REAL DOM elements by React. And real DOM elements only have the properties/attributes specified in the HTML specification. (Which doesn't include properties likeblahblahblah
) -
How do I receive props in a component? function Navbar(props) { console.log(props.blahblahblah) return (
... ) } -
What data type is
props
when the component receives it? An object!