ReactJS Tutorial - 15 - Methods as props

แชร์
ฝัง
  • เผยแพร่เมื่อ 1 ก.พ. 2025

ความคิดเห็น • 169

  • @RincyMathew-xl6fm
    @RincyMathew-xl6fm 10 หลายเดือนก่อน +6

    After going the first few tutorials - i know your first name :) - I wanted to say Vishwas that these are the best best tutorial i have come across - so very well structiured and very well explained - i have a long way to go in this playlist - but wanted to say thank you (million times) for compiling this well structured & well laid out playlist - thanks again!

    • @dikshaa262
      @dikshaa262 8 หลายเดือนก่อน

      hey can we follow this playlist in 2024?

    • @stillhet1986
      @stillhet1986 8 หลายเดือนก่อน

      @@dikshaa262 still viable in 2024

  • @ruijadom
    @ruijadom 5 ปีที่แล้ว +81

    Vishwas you are very good teachen. With knowledge, good to communicate and very structured. undoubtedly a channel to follow! Congratulations

    • @kingberz
      @kingberz 4 ปีที่แล้ว +3

      Absolutely!

  • @amanryzus
    @amanryzus 3 ปีที่แล้ว +4

    man, I can't I just can't stress enough how concise and simple ur guide is.
    what I spent days struggling and learning, was cleared in a matter of minutes.
    you are subscribed !!

  • @Immortal-pu8gr
    @Immortal-pu8gr 3 ปีที่แล้ว +1

    Tried learning with random videos they don't tell u these minute details, this is the best anyone will ever get.

  • @lukescheller7216
    @lukescheller7216 4 ปีที่แล้ว +4

    Probably THE BEST coding tutorial series I've ever studied.. THANK YOU.

  • @PragnaPresence
    @PragnaPresence 3 ปีที่แล้ว +10

    Addicted to this playlist. Best content on React on YT. Complex topics well explained in a very simpler way.

  • @bolanhost
    @bolanhost 6 ปีที่แล้ว +4

    Man, You are The best, Awesome, Amazing. It has been many years I am learning from TH-cam, different courses. but your Teaching Power is awesome, you are explaining in the best way. Thank you so much

  • @nandanithakur2172
    @nandanithakur2172 4 ปีที่แล้ว +16

    following your playlist, these are very easy to understand and helpful too. the way you explain the concept is awesome.
    requesting you to create series on react native too.

  • @amolmali3583
    @amolmali3583 3 ปีที่แล้ว +2

    Great explanation I ever seen for child to parent communication. Thanks Vishwas.

  • @talha8o
    @talha8o 5 ปีที่แล้ว +89

    I used to think Mosh was the best, but i think your approach suits me better.

    • @kingberz
      @kingberz 4 ปีที่แล้ว +32

      mosh skips a lot of things for paid courses

    • @ginnerzapata5909
      @ginnerzapata5909 4 ปีที่แล้ว

      Mosh is amazing and this man too

    • @DauntingGecko
      @DauntingGecko 4 ปีที่แล้ว +10

      Agreed. Mosh is pretty shockingly poor, constantly skipping essential parts rushing to get stuff done rather than teaching. He also has paid content that is out of date and his code is buggy. Mosh was too busy showing off, refactoring (improving) code all the time rather than teaching

    • @het314
      @het314 4 ปีที่แล้ว +2

      Soo true. I wasted a lot of time watching his videos.

    • @shashankpandey1966
      @shashankpandey1966 4 ปีที่แล้ว

      @@het314 same ..sed lyf..

  • @ramcharanmadasu7052
    @ramcharanmadasu7052 6 ปีที่แล้ว +1

    Actually I followed your angular tutorials since angular 2 bt., My boss requirement is react then I decided to learn react on that day... I saw you posted your first react video.... Thanks a lot sir... You helped me a lot... 😍😍😍

  • @4647540
    @4647540 4 ปีที่แล้ว +3

    I can't imagine understanding this complex topic by my own... Thanks man

  • @marvinfok65
    @marvinfok65 2 ปีที่แล้ว

    Vishwas, you have some of the best React lessons that I can find! Your lessons were very well organised with clear explanations and great examples!

  • @khadijaaitbouiramouin7776
    @khadijaaitbouiramouin7776 6 ปีที่แล้ว +19

    Great work sir, Please add videos related to React & Redux approach. Thanks a lot for your efforts that's something that we really appreciate.

  • @arminsmajlagic2907
    @arminsmajlagic2907 4 ปีที่แล้ว

    Thank you for these 76 videos, there is enough to get a good grasp of what is react...Thanks man !
    !

  • @henrywang4361
    @henrywang4361 2 ปีที่แล้ว

    The best tutorial and one of the most useful methods in web development!

  • @El_ii
    @El_ii 5 ปีที่แล้ว +8

    The best React Tutorial on the internet very easy to understand Thanks!!!

    • @harrykrishna4474
      @harrykrishna4474 5 ปีที่แล้ว

      Bro, did he explain anything about forms in his channel

  • @olegsubik
    @olegsubik 5 ปีที่แล้ว +3

    So well explained such an important theme! Easy to understand! thanks man

  • @ginnerzapata5909
    @ginnerzapata5909 4 ปีที่แล้ว

    your course is so good... The Odin project brought me here

  • @snehalpatil6691
    @snehalpatil6691 5 หลายเดือนก่อน

    This is best react video i have ever seen

  • @arunchauhan79
    @arunchauhan79 4 ปีที่แล้ว

    I like your way to teaching, i understand all the concept you are to explain. Thank you a lot for your efforts.

  • @toannew
    @toannew 4 ปีที่แล้ว +3

    2:15 template literal of ES6
    6:20 the arrow function is the simplest way to pass parameters from the child component to the parent component

  • @motor_matic
    @motor_matic 2 ปีที่แล้ว

    bro you just solved my problem, I was very confused with this but now its clear , thanks a lot bro for your awsome videos
    🙌

  • @arios0312
    @arios0312 5 ปีที่แล้ว +1

    Amazing tutorial, best i have seen so far

  • @soujanyavt
    @soujanyavt 4 หลายเดือนก่อน

    Superbbb. Very well explained vishwas sir ❤

  • @StanielBG
    @StanielBG 5 ปีที่แล้ว +2

    function comment() {
    return "The best React Tutorial on the internet!" + " " + "Very well explained in detail tutorial!" + " " + "More or less 'React for Dummies' ";
    }
    comment();

  • @jagdishshetty4782
    @jagdishshetty4782 5 ปีที่แล้ว +1

    All tutorials Very Well Explained !!! Thx so much !!!

  • @metizdev7945
    @metizdev7945 3 ปีที่แล้ว

    Awesome concept clearance of props pass methods and access methods in child component

  • @raisasadiq7957
    @raisasadiq7957 4 ปีที่แล้ว

    Best explanation in very simple way

  • @myseccode
    @myseccode 4 ปีที่แล้ว +1

    Best Tutorial. Thank you for making these

  • @arbazajaz2473
    @arbazajaz2473 4 ปีที่แล้ว +1

    EVERYTIME I LEARN SOMETHING NEW, I PRESS LIKE!

  • @abrarfahim64
    @abrarfahim64 ปีที่แล้ว

    Gopinav u are a gem

  • @i_tomek
    @i_tomek 5 ปีที่แล้ว +1

    Great work! Full free course for beginner in react, like me. Thanks :)

  • @mohamedreejan8143
    @mohamedreejan8143 4 ปีที่แล้ว +1

    Very useful tutorial. Great explanation . thanks you very much.

  • @MangSentot
    @MangSentot 4 ปีที่แล้ว +1

    Best tutorial than udemy courses !

  • @huanshao2165
    @huanshao2165 4 ปีที่แล้ว +1

    Awesome! I am a huge fun of you now

  • @westworld4553
    @westworld4553 ปีที่แล้ว

    this is just perfect content on react

  • @alasobhan6941
    @alasobhan6941 4 ปีที่แล้ว +2

    AMAZING TUTORIALS! YOU SHOULD MAKE MORE VIDEOS.

  • @sreea1504
    @sreea1504 5 ปีที่แล้ว +1

    Great work easy to understand
    Great work

  • @akashsrivastava8226
    @akashsrivastava8226 4 ปีที่แล้ว +1

    your work really appreciated, thanks a lot

  • @TomarSahabVlogs
    @TomarSahabVlogs 5 ปีที่แล้ว +3

    The 4th approach i.e using arrow functions is the best for binding the events

    • @MichaelRainabbaRichardson
      @MichaelRainabbaRichardson 5 ปีที่แล้ว

      The previous video covered this and I was just about to ask why he did not use an arrow function for greetParent 🤔

    • @ginnerzapata5909
      @ginnerzapata5909 4 ปีที่แล้ว

      @@MichaelRainabbaRichardson I think it is because he said at the start of the series he wanted us to get used to this and its perks. So maybe he is just teaching us through repetition about binding in the state and stuff.

  • @shloch2007
    @shloch2007 5 ปีที่แล้ว +1

    very good at explaining .... you are great

  • @holong583
    @holong583 5 ปีที่แล้ว +2

    you saved me, thanks so much

  • @vaibsify
    @vaibsify 3 ปีที่แล้ว

    awesome explanation 🙏

  • @lathagm666
    @lathagm666 ปีที่แล้ว

    completed video 15. Thanks 🙂

    • @abhisheksaxena2411
      @abhisheksaxena2411 10 หลายเดือนก่อน

      Have u completed this playlist?

  • @aresstest9860
    @aresstest9860 6 ปีที่แล้ว +4

    Sir great I am waiting your next react js video.. Please add video related react .. As soon as possible

  • @Aditya.Santra
    @Aditya.Santra 3 ปีที่แล้ว

    Very Helpful Video

  • @issaissifou3579
    @issaissifou3579 5 ปีที่แล้ว +1

    Great work!

  • @arpansaha7369
    @arpansaha7369 ปีที่แล้ว

    Great information videos, just a request for using functional components instead of child one as it is used more

  • @nahassan2000
    @nahassan2000 ปีที่แล้ว

    Thank you Sir!

  • @prisinha
    @prisinha 3 ปีที่แล้ว

    5:15 pass prop from child component

  • @MrEuugen
    @MrEuugen 4 ปีที่แล้ว +1

    excellent tutorial..

  • @piyushkumar-me1nb
    @piyushkumar-me1nb 9 หลายเดือนก่อน

    As a Python developer, I should upgrade myself in React JS or pyspark?

  • @ajaybatham3622
    @ajaybatham3622 5 ปีที่แล้ว +1

    Great Sir...

  • @arunskaria7646
    @arunskaria7646 3 ปีที่แล้ว

    Doubt:just after creating a class component, why are we deleting the export keyword? (it occures in between 0:50-0:55 in video)
    Meanwhile the tutorial is very good and easy to understand

    • @praiseoshilim1006
      @praiseoshilim1006 3 ปีที่แล้ว

      He deleted the export keyword because we don't want named export. We want a default export.
      Basically, when we want to import 'ParentComponent' in say app.js, you do this:
      Default = 'import ParentComponent from './Component/ParentComponent' . Rather than Named = 'import { ParentComponent } from './Component/ParentComponent'
      I hope I was able to clear your doubt. Thanks

  • @Heisenbergmpl
    @Heisenbergmpl 4 ปีที่แล้ว +1

    For me No comments for your fabulous Vedios

  • @prisinha
    @prisinha 3 ปีที่แล้ว

    4:20 use method as value of attribute

  • @vignesh3by4
    @vignesh3by4 4 ปีที่แล้ว +1

    Hi Codevlotion, Can u please tell what theme and font are u using to enable font ligatures. it will be very useful

    • @editorera239
      @editorera239 4 ปีที่แล้ว

      were you asking for this ES7 React/Redux/GraphQL/React-Native snippets
      extension

  • @DeepakSingh-sy4ws
    @DeepakSingh-sy4ws 4 ปีที่แล้ว

    You are too good man.

  • @yznyzn8939
    @yznyzn8939 ปีที่แล้ว

    professional thanks a lot

  • @sudippoudel1840
    @sudippoudel1840 4 ปีที่แล้ว +1

    Can we use bind in place of arrow function? If so, why ?

  • @san29sh
    @san29sh 4 ปีที่แล้ว

    the way of explaining is too good.

  • @AmmuMizAymuAlu
    @AmmuMizAymuAlu 2 ปีที่แล้ว +1

    import React from 'react'
    function ChildComponent (props) {
    return (
    props.greetHandler()}>Greet Parent
    )
    }
    export default ChildComponent

  • @prakashmohaldar9004
    @prakashmohaldar9004 2 ปีที่แล้ว

    If we would have defined childcomponent as a class component then do we have to bind props.greetHandler too in childcomponent ?

  • @jakubgadzala7474
    @jakubgadzala7474 3 ปีที่แล้ว

    Legend!

  • @AhamedKabeer-wn1jb
    @AhamedKabeer-wn1jb 4 ปีที่แล้ว

    Thank you Sir..

  • @jakehuang4697
    @jakehuang4697 4 ปีที่แล้ว

    Hi sir. I would like to ask which react snippet did you in the video. Can you let me know when you get a chance? T

  • @aravind_venkatachalam
    @aravind_venkatachalam 3 ปีที่แล้ว +1

    Nanbargale Vanakam

  • @richardli7020
    @richardli7020 4 ปีที่แล้ว +1

    Does this only work when the parent component is a class? Cuz I tried to use a functional component as the parent and it didn't work

  • @kamesha5973
    @kamesha5973 3 ปีที่แล้ว

    Shall we inherit properties from childcomponent to parentcomponent,Sir?

  • @ramsinassyrian7904
    @ramsinassyrian7904 3 ปีที่แล้ว

    legend

  • @moderncloth
    @moderncloth 4 ปีที่แล้ว

    I love you, Vishwaz.

  • @pranavkanekar277
    @pranavkanekar277 9 หลายเดือนก่อน

    best ever

  • @vvmanikantakantipudi9919
    @vvmanikantakantipudi9919 2 ปีที่แล้ว +1

    At 5.33 in childcomponent props used that is not workingout with me it's results error at the browser can u help me to fix this

  • @tmahesh3607
    @tmahesh3607 3 ปีที่แล้ว

    8:09 i know the concept of desctructuring !but for this example can you tell me how to desctructure ? i have tried is it correct?
    childComponent.js
    import react from 'react'
    function childComponent(greetHandler)
    {
    return( greetHandler('child')}>greet parent )
    }

  • @neokristar
    @neokristar ปีที่แล้ว

    The greet parent button is not visible, I have written ParentComponent and childComponent properly and included the parentComponent in app.js, but still it is not visible

  • @rabinawale5224
    @rabinawale5224 2 ปีที่แล้ว

    do we still need to bind this keyword on constructor if we are using number 2 way( fat arrow)?

  • @geragamo
    @geragamo 3 ปีที่แล้ว

    Please post the extension used for snippets, and good video

  • @siddheshingalkar9300
    @siddheshingalkar9300 ปีที่แล้ว

    @Codeevolution its showing me an error for the above example, can you tell me where have you defined in ChildClass the function property 'Child' to ParentClass childName. The childName is declared but its value is never assigned.
    The error while executing the code is "Hello Parent from undefined."

  • @AAKSHAS
    @AAKSHAS 3 ปีที่แล้ว

    6:06 how to pass a parameter when calling parent method from child component

  • @vikk1249
    @vikk1249 3 ปีที่แล้ว

    is it also called as state lifting sir?

  • @codewithsub5083
    @codewithsub5083 4 ปีที่แล้ว +1

    This doesn't work in non creat-react-app. Getting this is undefined in parent component.

  • @sabajaved9821
    @sabajaved9821 4 ปีที่แล้ว +1

    The code is giving me Error: "props.clickHandler is not a function" and not displaying the alert dialog box.

    • @hashmatali4409
      @hashmatali4409 4 ปีที่แล้ว +2

      see if you bind this function into the constructor

  • @kunalsakhare7538
    @kunalsakhare7538 4 ปีที่แล้ว

    why is line 12 needed in ParentComponent.js? What happens if greetParent was an arrow function, then line 12 would be still needed?

  • @manyaaaa2607
    @manyaaaa2607 ปีที่แล้ว

    Can you make video on "methods as props using functional component"

  • @youtuberjonyo6094
    @youtuberjonyo6094 3 ปีที่แล้ว

    why can I not use parent component method at any other html element except button click event inside child component?

  • @prasadreddy7181
    @prasadreddy7181 5 ปีที่แล้ว

    Is it correct passing parameters from child component to parent component. ? I heard that the data should pass from parent to child.

    • @MuhammadUsman-rp3ph
      @MuhammadUsman-rp3ph 5 ปีที่แล้ว

      i think it mimics the concept of inheritance from object oriented programming like in c# and java.. so if it is so then cant pass data from child to parent

  • @alexb.2616
    @alexb.2616 4 ปีที่แล้ว

    thanks

  • @valikonen
    @valikonen 4 ปีที่แล้ว

    This is the only way you can transmit data from a child component to a parent component in react?

  • @Kidsadan
    @Kidsadan 4 ปีที่แล้ว

    one correction in ParentComponent :
    Use function like below to avoid greetParent function not found error:
    greetParent = (childName)=>{
    alert(`Hello ${this.state.parentName} greetings from ${childName}`)
    }

  • @chidokaemeka1878
    @chidokaemeka1878 3 ปีที่แล้ว

    lovely

  • @PujaKumari-ie9kj
    @PujaKumari-ie9kj 3 ปีที่แล้ว

    I have a question, if we have a button and onclick setstate changes the flag var to true and we want to display set of data from state using map, how to achieve this ? I'm able to display using map without the flag condition but with condition , I'm unable to . {this.state.flag ? (
    {events.map(event => (event.EventName))
    }

    ): null}
    would something like this work ? As its not working. :(

  • @lesterlugtu4090
    @lesterlugtu4090 4 ปีที่แล้ว

    Did i get it right? that upon clicking the button in the Child, it doesn't "set another state" in the Parent? It just alerted the parentName out? These are all just passing property from Parent to Child and parameter from Child to Parent? or mali ako? :)

  • @lakki_rock1651
    @lakki_rock1651 4 ปีที่แล้ว

    Sir, when I am applying ES6 feature for alert.. It was not getting output.

  • @modestmoron
    @modestmoron 4 ปีที่แล้ว

    Why we are using arrow function to pass parameters? Why can't we just use props.greetHandler('child'). I know we can't use this but why?

    • @sumanpokharel1718
      @sumanpokharel1718 4 ปีที่แล้ว

      because by doing this we are calling back the greetHandler function where we were supposed to run the function.if you want to do this you have to write it inside a arrow function as it automatically binds this keyword.

  • @RajuActiveLifestyle
    @RajuActiveLifestyle 5 ปีที่แล้ว

    Hey hi, your videos are very useful to me.
    I have doubt in this video.
    How to access child component methods from parent component.
    Please help me.
    Waiting for your valuable reply.
    Thanks

    • @yadnyeshrane8498
      @yadnyeshrane8498 3 ปีที่แล้ว

      I think this your problem can be solved with ref

  • @saumyasundaram2768
    @saumyasundaram2768 3 ปีที่แล้ว

    bind had been removed from react or what??

  • @munishgupta7878
    @munishgupta7878 4 ปีที่แล้ว

    I tried doing it without using the constructor and bind keyword. Code is something like this:
    class ParentComponent extends Component{
    state={
    message:'Greetings'}
    greetParent(){
    alert(`hello ${this.state.message}`);
    render(){
    return(
    Getting an error message: TypeError: Cannot read property 'state' of undefined.
    Any idea what am I missing?
    Got the solution. Just make the greetParent an arrow function.

  • @aribkamal3239
    @aribkamal3239 3 ปีที่แล้ว

    I still cant figure out how passing in childName will equate to child in the child component

    • @aribkamal3239
      @aribkamal3239 3 ปีที่แล้ว +1

      WAIT nvm I got it. beautiful.

    • @Vsumit17OG
      @Vsumit17OG 3 ปีที่แล้ว +1

      from rendering

  • @vikramadityasingh7407
    @vikramadityasingh7407 3 ปีที่แล้ว

    Nice