PROPS in React explained 📧

Поделиться
HTML-код
  • Опубликовано: 28 июн 2024
  • #React #JavaScript #tutorial
    00:00:00 introduction
    00:00:56 props
    00:04:49 index.css
    00:06:28 multiple components
    00:07:49 propType
    00:10:18 defaultProps
    00:11:47 conclusion
    // props = read-only properties that are shared between components.
    // A parent component can send data to a child component.
    // key=value
    // propTypes = a mechanism that ensures that the passed value
    // is of the correct datatype.
    // age: PropTypes.number
    // defaultProps = default values for props in case they are not
    // passed from the parent component
    // name: "Guest"

Комментарии • 120

  • @BroCodez
    @BroCodez  8 месяцев назад +31

    import Student from './Student.jsx'
    function App() {
    return(







    );
    }
    export default App
    import PropTypes from 'prop-types';
    function Student(props){
    return(

    Name: {props.name}
    Age: {props.age}
    Student: {props.isStudent ? "Yes" : "No"}

    );
    }
    Student.propTypes ={
    name: PropTypes.string,
    age: PropTypes.number,
    isStudent: PropTypes.bool,
    }
    Student.defaultProps = {
    name: "Guest",
    age: 0,
    isStudent: false,
    };
    export default Student
    .student{
    font-family: Arial, sans-serif;
    font-size: 2em;
    padding: 10px;
    border: 1px solid hsla(0, 0%, 50%, 0.8);
    }
    .student p{
    margin: 0;
    }

    • @thecoder1694
      @thecoder1694 8 месяцев назад +6

      No word you man priceless help!

    • @arpanshah355
      @arpanshah355 8 месяцев назад +5

      @BroCodez !!!! nice to know your not dead :D also, could you do a toutorial for C/C++ windows (kinda like tkinter for python) thx
      good job on your vids though, helped me a lot. :)
      super simple and easy to understand otherwise, the perfect combo for beginers

  • @andredubbs4854
    @andredubbs4854 8 месяцев назад +43

    I really cannot express how much of a positive impact you’re having on the world. Your videos helped me immensely, the education is poor in my country and i can make it up alot with your videos

  • @codewithdahir
    @codewithdahir 8 месяцев назад +9

    You are so good man, keep going.
    My whole front end development belongs to you.
    Thanks a lot.

  • @malikgulraiz3659
    @malikgulraiz3659 8 месяцев назад +12

    We want more React tutorials from bro
    👇

  • @ursusrursus9325
    @ursusrursus9325 8 месяцев назад +7

    Thanks Bro! You are one of those about whom philosophers have said: "The obvious is something that no one sees until someone expresses it in the simplest way."

  • @AC_Music
    @AC_Music 5 месяцев назад +1

    blessed to have you as a mentor. A thank you is not enough! Much love ❤

  • @wilmermedina7258
    @wilmermedina7258 4 дня назад

    Bro, just 12 minutes was enough to perfectly understand this topic. I've watched several videos about it, but this one is just perfect. Thanks a lot!

  • @ff4937
    @ff4937 7 месяцев назад +1

    Excellent overview of PROPS!!! Very clear and concise! Please keep going.

  • @tonytodd7011
    @tonytodd7011 7 месяцев назад +2

    Thanks Bro! You are really an awesome teacher, and your way of dividing the topic into small lessons are great! That is very much more practical for people to learn than watching a dozens of hours video!

  • @frankmccann29
    @frankmccann29 8 месяцев назад

    Hey, appreciate you popping in with a great video. Saved it.

  • @sarahwbas
    @sarahwbas 28 дней назад

    You are an amazing teacher!! No one should teach coding after you!! 👏🏼👏🏼 Thank you for existing!

  • @aroshm1682
    @aroshm1682 3 месяца назад

    Broo!!! I learned crazy loads of stuff in this 12 mins than I try to learn past 24 hours. Damn good content bro!! Thank you!!

  • @hunin27
    @hunin27 8 месяцев назад +1

    Thanks!
    I just finished watching and I learned a lot from this ❤

  • @mohamedreda6299
    @mohamedreda6299 8 месяцев назад

    This series is awe-inspiring thank you a lot!❤❤❤❤❤❤

  • @magomihaly1741
    @magomihaly1741 8 месяцев назад

    Love your vids, focus on essence , easy to understand. Thank you Bro!

  • @cubingwithshine180
    @cubingwithshine180 8 месяцев назад +1

    Thank you so much for this awesome tutorial

  • @abdulkadiraminu262
    @abdulkadiraminu262 8 месяцев назад +4

    😭dude idk how u knew I was just learning react but thank you for the videos.

    • @BroCodez
      @BroCodez  8 месяцев назад +4

      I'm from the future

    • @ImAbbasious
      @ImAbbasious 6 месяцев назад

      pls make 10hours tutorial of React.js from Beginner to Expart please and please sir, can't pay for tuitions fee but bro code on RUclips bring more than Degrees@@BroCodez

  • @romyt9816
    @romyt9816 7 месяцев назад

    The first video I see that explains clearly that props are an OBJECT and defines them with a punctual sentence and not with a vague terms or with comparisons like "parameter of a function" or "pseudo HTML attribute".
    Thanks, now I understand them better, I'll follow the serie.

  • @vishalboudhh
    @vishalboudhh 8 месяцев назад +2

    I love your videos ❤
    Very simple easy to understand
    And not to much time taking

  • @sulaimanmisri6411
    @sulaimanmisri6411 4 месяца назад +1

    I am relatively new to React.js and your explanation make sense and easy to follow. Kudos Bro!

  • @keisergg8701
    @keisergg8701 7 месяцев назад

    thanks a ton! u are amazing
    pls keep uploading.

  • @dark_camper83
    @dark_camper83 2 месяца назад

    Nice explanation buddy. Thank You!!!

  • @DrClappinCh33ks
    @DrClappinCh33ks 5 месяцев назад

    Extremely great presentation ❤

  • @keisha7586
    @keisha7586 3 месяца назад

    Thanks! clear presentation

  • @SatyabrataOjha-mr5nr
    @SatyabrataOjha-mr5nr 3 месяца назад

    Wow, just nice explanation, love it

  • @user-qj5bg3fp3r
    @user-qj5bg3fp3r 4 месяца назад

    Amazing content, Thank you. God bless

  • @shivanshuhere
    @shivanshuhere 6 месяцев назад

    clean and simple , loved it
    🌮

  • @ykfazzz
    @ykfazzz 8 месяцев назад

    please a full React course, even though i'm intermediate in React, your videos are ones i learn the most from

  • @kevz_codes
    @kevz_codes 4 месяца назад

    Wow 😮so easy to understand! Thank you so much ☺️ I just subscribed ❤

  • @deitunegold4593
    @deitunegold4593 3 месяца назад

    First tutorial i watched and i understood thoroughly 🔥

  • @Odidi_Bee6ix
    @Odidi_Bee6ix 7 месяцев назад

    Exquisite 🙌🏾

  • @piouf9850
    @piouf9850 3 месяца назад

    easy to understand , thank u

  • @Rae_895
    @Rae_895 8 месяцев назад +4

    After this pls make a typescript version since typescript is mostly used with popular js frameworks

    • @juanmacias5922
      @juanmacias5922 8 месяцев назад +1

      I mean, I"ve been using TS, you just have to add the right typing, when the IDE screams at you. :D

    • @juanmacias5922
      @juanmacias5922 8 месяцев назад +1

      This was my final code for Student.tsx:
      interface StudentProps {
      name?: string;
      age?: number;
      isStudent?: boolean;
      }
      const Student = ({
      name = "Guest",
      age = 0,
      isStudent = false,
      }: StudentProps) => {
      return (
      Name: {name}
      Age: {age}
      Student: {isStudent ? "Yes" : "No"}
      );
      };
      export default Student;

  • @ulbiomanzano7395
    @ulbiomanzano7395 8 месяцев назад +2

    Que fácil se hace aprender react con BroCode, muchas gracias, excelente trabajo.

  • @JoseSanchez-wg7pe
    @JoseSanchez-wg7pe 6 месяцев назад

    tysm, you really helped me with this topic

  • @malikgulraiz3659
    @malikgulraiz3659 8 месяцев назад +1

    My understanding for programming after watching Bros videos 📈📈📈❤

  • @hongdevp
    @hongdevp 8 месяцев назад

    Thanks your tutorial ❤

  • @techguykay
    @techguykay 8 месяцев назад +1

    over 2 year ago i decided to change careers and learn coding, i started with your python videos, and today im an intern swe (mobile application development), currently learning react-native and still watch you Bro-Code. My programming Kinng 😤🙌 i wanna see more of this new seriesssss!!!

    • @HimanshuVermayohoho
      @HimanshuVermayohoho 8 месяцев назад

      hey bro how did you get the job, can help me to know how you did it

  • @balusubramaniam2335
    @balusubramaniam2335 3 месяца назад

    nice viedo very infornative ✌

  • @theavalontech
    @theavalontech 4 месяца назад

    Awesome Explanation bro

  • @volodyslove
    @volodyslove 8 месяцев назад

    Nice lesson!😁

  • @AH_FS
    @AH_FS 8 месяцев назад +1

    Thank you soo much i love ur videos

  • @nihongo_
    @nihongo_ 7 месяцев назад

    thanks a million bro

  • @wisdomsamuel-pe2fm
    @wisdomsamuel-pe2fm 8 месяцев назад

    God 🎉 bless you.. This is excellently explained 😊

  • @d1ce966
    @d1ce966 8 месяцев назад

    Thank you bro more react videos

  • @CodingChannel1
    @CodingChannel1 8 месяцев назад

    Amazing 👏

  • @ahamedsha_jr
    @ahamedsha_jr 8 месяцев назад

    not gonna start the series until you complete it anyways for the algorithm 🔥🔥🔥

  • @yurisouza4874
    @yurisouza4874 6 дней назад

    Thanks Bro!

  • @alwaysgrowww
    @alwaysgrowww 8 месяцев назад +1

    cool video bro!

  • @syramoran9270
    @syramoran9270 Месяц назад

    TY ❤

  • @benhur221
    @benhur221 8 месяцев назад

    props to you Bro

  • @riticklath6413
    @riticklath6413 8 месяцев назад

    Waiting for it Thanks a lot bro ❤
    Please make it bit quick 🙏

  • @hunin27
    @hunin27 8 месяцев назад +2

    Thanks Bro!
    I really needed this playlist completed as i need to learn react and you arrived just in time !
    Respect ❤

  • @user-cs6rz9jn8n
    @user-cs6rz9jn8n 8 месяцев назад +1

    Perfect

  • @shadownerverdie
    @shadownerverdie 8 месяцев назад

    so great

  • @primordialatom1478
    @primordialatom1478 8 месяцев назад +1

    Nice

  • @3X1Z3
    @3X1Z3 8 месяцев назад +1

    Love u brooo❤

  • @oussemaelmzergui7055
    @oussemaelmzergui7055 8 месяцев назад

    You never miss

  • @user-ni9rs2wk4g
    @user-ni9rs2wk4g 8 месяцев назад

    Can you do a video with a full course of Visual BASIC Programming language??

  • @_sf_editz1870
    @_sf_editz1870 8 месяцев назад

    sensei waiting for the next video

  • @ThatOnlyArab
    @ThatOnlyArab 8 месяцев назад +1

    YOUR BACK 🎉🎉🎉🎉

  • @LoveandPeace1111
    @LoveandPeace1111 3 месяца назад

    Live it

  • @GATIF786
    @GATIF786 8 месяцев назад

    Kindly, make a complete video on React Js and React Native (Including User Login Authention from Mysqli database).

  • @silverfoxcr5194
    @silverfoxcr5194 8 месяцев назад

    Bro you have to finish the Playlist in less than 3 months I'm doing my final computer science proj using React and I need your explanation ❤

  • @antoniobanderas1287
    @antoniobanderas1287 16 дней назад

    perfect ;P

  • @arealmemeist6421
    @arealmemeist6421 8 месяцев назад +1

    'props' to you for making this video lol

    • @BroCodez
      @BroCodez  8 месяцев назад +2

      I loled at that one

  • @namesjeff5213
    @namesjeff5213 8 месяцев назад +1

    👑

  • @acosmic7841
    @acosmic7841 8 месяцев назад

    Are you making a longer react tutorial slated to release in 2024?😊

  • @drididali1755
    @drididali1755 8 месяцев назад

    hoooks bro

  • @tukkinum
    @tukkinum 6 месяцев назад

    i love this, but i have a question. how would we go about different images for each student? ive tried to figure it out myself but to no avail. thanks!

  • @aureusvisions
    @aureusvisions 8 месяцев назад +1

    wow

  • @tavidev
    @tavidev 8 месяцев назад

    could you also make a deno fresh series?

  • @jiazhiong8273
    @jiazhiong8273 8 месяцев назад

    bro, pls make a full course on android mobile application programming, maybe with Java or Kotlin. Thank you for your courses!

  • @Yesterday_i_ate_rat
    @Yesterday_i_ate_rat 8 месяцев назад

    ❤❤

  • @user-dz3lq5hb8m
    @user-dz3lq5hb8m 8 месяцев назад +1

    Be like bro code
    Absolutely legendary BROgramer

  • @tee-hee9553
    @tee-hee9553 8 месяцев назад

    The proptypes and the defaultprops does not have any color, beside white on my visual studio code what should I do ?, I know it's working but I want color to check if I type wrong or not please help

  • @pastuh
    @pastuh 8 месяцев назад +1

    Strange why not called propDefaults

  • @chakrounmohamedslim8748
    @chakrounmohamedslim8748 8 месяцев назад

    Please give us a blazor tutoriel after. Net 8

  • @thashreef2125
    @thashreef2125 8 месяцев назад

    waiting for react Hooks and CRUD operations

  • @Delicatamente
    @Delicatamente 2 месяца назад

    huge thanks!

  • @tonich81
    @tonich81 7 месяцев назад

    Can you do nodejs tutorial 😆 Your videos its easy to understand

  • @21Kqaile-
    @21Kqaile- 8 месяцев назад +1

    W

  • @_sf_editz1870
    @_sf_editz1870 8 месяцев назад

    sensei

  • @lf00t
    @lf00t 4 месяца назад

    Bro, is there a way to enable autocomplete/ intellisense for prop.[dot] ... ?
    coming from java, this is really annoying and easy to make silly typos

  • @Gunz1234
    @Gunz1234 8 месяцев назад

    I think yt spies me cuz I am on a course and I'm on the props part n this shows up

  • @animatsuki5345
    @animatsuki5345 3 месяца назад

    кайф!

  • @ImAbbasious
    @ImAbbasious 6 месяцев назад

    Sir, we need 10Hours React for total Begnner please

  • @Comedy_Center12
    @Comedy_Center12 2 дня назад +1

    Excellent ❤❤❤

  • @dwwe-xt5ys
    @dwwe-xt5ys 8 месяцев назад

    make a full couse on x86 assembly language

  • @darkworldgaming5580
    @darkworldgaming5580 8 месяцев назад

    bro bros voice change a lot in 2years

  • @fatouz5104
    @fatouz5104 8 месяцев назад

    How do you know I have a react project for college😭thank you

  • @ABM200_
    @ABM200_ 8 месяцев назад

    assalomu alaykum qales Muhiddin aka

  • @user-cs6rz9jn8n
    @user-cs6rz9jn8n 8 месяцев назад +1

    Lessons

  • @rodeotcd
    @rodeotcd 8 месяцев назад +1

    This is

  • @noicefrog
    @noicefrog 8 месяцев назад

    bro code is da besstt

  • @adonissss1881
    @adonissss1881 8 месяцев назад

    Hi! I have a python project. And i want to create a gui for it. How do i? I dont know. Can you teach me or how do i learn it?

    • @hunin27
      @hunin27 8 месяцев назад +1

      use a gui library for python

    • @adonissss1881
      @adonissss1881 8 месяцев назад +1

      @@hunin27 how?

  • @focusedstudent464
    @focusedstudent464 8 месяцев назад +1

    16th comment

  • @noicefrog
    @noicefrog 8 месяцев назад

    bro code pls colab

  • @protibadimon4169
    @protibadimon4169 8 месяцев назад

    Hey bro, can you help me by coding chess game?

  • @aletondaX
    @aletondaX 8 месяцев назад +2

    Do you still love pizza?

    • @BroCodez
      @BroCodez  8 месяцев назад +3

      always and forever