ReactJS Basics - #6 Passing Data with Props

preview_player
Показать описание
React Components should be able to interact. Props allow you to pass Data from a Parent Component to a Child Component.

----------

----------

• Follow @maxedapps and @academind_real on Twitter

See you in the videos!

----------

Рекомендации по теме
Комментарии
Автор

Great work, indeed.
For those using latest React version: use prop-types instead of React.PropTypes.#dataType#

1) npm install --save-dev prop-types
2) In Home.js:
import PropTypes from 'prop-types'

3)
Home.propTypes = {
name: PropTypes.string,
age: PropTypes.number,
user: PropTypes.object
}

prateeksharma
Автор

LOL I spend 50 $ on online course and 4 hours to learn about props and here its free and only 16 minute and much cleaner <3 well done man

code
Автор

Great tutorial indeed.
For those watching this video in 2020, just add

1) import PropTypes from 'prop-types';
then
2)
Home.propTypes = {
name: PropTypes.string,
age: PropTypes.number,
user: PropTypes.object
};

fabonic
Автор

I'm a newbie to react. I'm only following your series to learn React. At 1:50 as you've used
<Home name={"Max"} />can also be done with <Home name="Max" />
The first one is bullet proof because if you're trying to pass a variable, not a string or any value. Thanks for your series. :)

sirajul-anik
Автор

I must say this is the best prop explanation on youtube so far. Great work.

TheJaivijay
Автор

Finally someone can explain it simply, right to the point. Thanks.

enclaveblacklegion
Автор

Hands down the best explanation for props!

vivekpandey
Автор

Been having a hard time trying to fully understand Props, I was actually trying to use state to do what you did with Props. This video made it very clear of what I need to do now.
Thanks, awesome video!

cavanbiggs
Автор

Thank you. These series are the best! Good for a very React beginner, very clear explanation of many components interacting, state and props

irynasherepot
Автор

i`ve searched lot for React. for sure i can say this is the best tutorial met so far. Thanks lot :) :)

thinuwanimihira
Автор

Thanks a lot! The basic of props and children concept is clear to me now. It was simple but super effective approach. Take a bow.

shaikatjibs
Автор

These tutorials are appreciated, they have made my life much easier.

rondunphy
Автор

your react class based lecture are awesome even in 2020.

prashmai
Автор

Great tutorial. A lot of ground covered. Thanks.

kamaboko
Автор

Sir, thank you so much for spending time teaching stuffs with strangers like me. I am very grateful for that! 😇

rosgarcia
Автор

Excellent tutorial and greate explanation 👍

kapilsoni
Автор

Thanks for this! You explained it well! I watched many tutorials on how to work with props but only this one helped me!

johnraymundbernal
Автор

Wonderful tutorial, this just made me understand props way better!!!

ChidyNwanya
Автор

Thank you Max! you make difficult things seem easy!

amardeepbhowmick
Автор

Thank you! You cleared up the question I've had about passing props and was having a hard time finding the answer to, in under 4 minutes.

ButterflyCreativity