-
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!
p
Airbnb-Clone
public
2 stars
0 forks
0 issues
Commits
List of commits on branch main.Unverified
cc933c63b5b0e3b83d23db1d4d252edf65d7ae06fix: path
ppurohitdheeraj committed 2 years ago
Unverified
fc5a5b25f8bd4a92ced2b93cd2be31d349c5a952Fix: image path and public resolved
ppurohitdheeraj committed 2 years ago
Unverified
7b594d617a54d4da6438033178221a222c51a9a3feat: props + data.js ✅
ppurohitdheeraj committed 2 years ago
Unverified
850d664e0b9f5197638287e7b430abcdf1de89f2Feat: Static Design + Card ⭐
ppurohitdheeraj committed 2 years ago
Unverified
aea7d96c9efd32e3e235dee171bab5f4b48d5efaFeat: Navbar + Hero ✅🚀
ppurohitdheeraj committed 2 years ago
Unverified
2452431c559cea15b8aaad05e3a1fe44f27a4ecfFix : Setup and Components ✅
ppurohitdheeraj committed 2 years ago