React TypeScript Tutorial - 5 - Advanced Props

📘 Courses - learn.codevolution.dev/
⚡️ Checkout Taskade! www.taskade.com/
💖 Support UPI - support.codevolution.dev/
💖 Support PayPal - www.paypal.me/Codevolution
💾 Github - github.com/gopinav
📱 Follow Codevolution
+ Twitter - / codevolutionweb
+ Facebook - / codevolutionweb
📫 Business - codevolution.business@gmail.com
Advanced Prop Types with React and TypeScript

Пікірлер: 57

  • @Codevolution
    @Codevolution2 жыл бұрын

    Use coupon code CodevolutionKZread for 100% off lifetime discount to your subscription at www.taskade.com/billing

  • @srshah

    @srshah

    10 ай бұрын

    I know it is pretty late but the coupon code is giving 10% off not 100%. I wish it gave 100% :)

  • @phantomknight287
    @phantomknight2872 жыл бұрын

    Superb Video, No rubbish, No clickbait just Pure Content, Thanks for Teaching me React and Nextjs.

  • @shehzadhussain01

    @shehzadhussain01

    Жыл бұрын

    React with Typescript

  • @faisalzone
    @faisalzone Жыл бұрын

    These videos are so good! I'm a Python/Django developer who's moving to NextJS. And I found TypeScript to be one of the ideal ways to write code in NextJS. These videos are helping me learn just enough in-depth fundamentals of TypeScript.

  • @ajayagrawal1090
    @ajayagrawal10902 жыл бұрын

    VIshwas you are incredible!!!!. You present the content really well and planned in each step.

  • @ishanihewage3734
    @ishanihewage37342 жыл бұрын

    Waiting for the next video on React TypeScript Tutorial. These were amazing well explained and thanks for doing this.

  • @endthefed5304
    @endthefed5304 Жыл бұрын

    Great videos in the typescript playlist!! Thanks for your excellent teaching! BTW, in 2022, children is no longer required as an explicit prop: // The best way to properly type children is to use built-in type FC. import { FC } from 'react'; // If the only prop you expect is children: const MyComponent: FC = (props) => {}; // props includes only children property // If you want to include more props than just children: interface MyProps { name: string; } const MyComponent: FC = (props) => {}; // props includes children and name properties

  • @Wibu393
    @Wibu3939 күн бұрын

    Perfect Course ! your voice so clear and very easy to understand. thanks

  • @user-lq1ku9he6c
    @user-lq1ku9he6c11 ай бұрын

    Your guide is very easy to understand. Thanks so much

  • @YuriiKratser
    @YuriiKratser2 жыл бұрын

    Don't stop bro! Nowadays is a mainstream! Thanks

  • @Prasanth_Venkatachalam
    @Prasanth_Venkatachalam2 жыл бұрын

    Thank you very much. It's Very Useful to develop React Apps. Your voice is just amazing

  • @joybee210
    @joybee2102 жыл бұрын

    awesome, I learned a lot. thanks!

  • @angeleskidragan
    @angeleskidragan Жыл бұрын

    Thank you for the great videos!

  • @kenhan168
    @kenhan168 Жыл бұрын

    So good, thanks a lot!

  • @zainuddin1205
    @zainuddin12052 жыл бұрын

    This is great content...Thank you

  • @ArjunRaj-xn8es
    @ArjunRaj-xn8es2 жыл бұрын

    Superb videos 🙏🏼

  • @A03L
    @A03L Жыл бұрын

    its true when they said typescript is superior, fascinating!

  • @matthiasfendt4503
    @matthiasfendt4503Ай бұрын

    Great tutorial but for the status type I would recommend using an enum instead of union of string literals.

  • @rahulvashishth8551
    @rahulvashishth85512 жыл бұрын

    i would recommend to have other payment methods for support. i.e. upi, patron. many people don't use paypal.

  • @yash8904
    @yash8904 Жыл бұрын

    Doubt: When I do this and the output in the ui is coming directly from the Heading component and not from Heading component being passed to Parent component as prop (---{props.children}---which is heading component in this case) UNDER PARENT COMPONENT Is it supposed to be that way or am I missing something in the concept?

  • @milindnaik8115
    @milindnaik81152 жыл бұрын

    Amazing

  • @Shakas420
    @Shakas4202 жыл бұрын

    Awesome!

  • @timacorn2536
    @timacorn2536 Жыл бұрын

    Quick question, in app.tsx, how does Status only have this: but heading and oscar have ...... and ....?

  • @vilayatsafarov9214
    @vilayatsafarov9214 Жыл бұрын

    That is awesome...

  • @jibinkoshy2739
    @jibinkoshy27392 жыл бұрын

    Thanks

  • @worstenbroodje6832
    @worstenbroodje6832 Жыл бұрын

    Great series so far this is really teaching me a lot! One question though, how does the syntax work when assigning a default value of 0 to messageCount at 8:37. You set messageCount = 0 but when a prop is passed it takes the prop instead and you don't need to do props.messageCount anymore but just messageCount instead? I've never seen this before.

  • @uzDevWorkshop

    @uzDevWorkshop

    Жыл бұрын

    this is object destructuring

  • @genos2719
    @genos27192 жыл бұрын

    amazing

  • @tadurirk
    @tadurirk2 жыл бұрын

    Awesome

  • @wizardy6267
    @wizardy62672 жыл бұрын

    Thanks for this tutorial. One questin for the status example, why not use enum?

  • @Codevolution

    @Codevolution

    2 жыл бұрын

    Literals are easier

  • @mayureshkumar3717
    @mayureshkumar37174 ай бұрын

    const { message=0} = props not working. for an optional value its giving unefined in a TS online compiler

  • @ashishnayak2666
    @ashishnayak26662 жыл бұрын

    Best video

  • @rlm41
    @rlm41 Жыл бұрын

    For the children props part. Why does it work when you are not using the text as a prop of for example, instead of

  • @AboudASalam

    @AboudASalam

    11 ай бұрын

    Children prop is meant for passing data within the component tag , mainly to render other components as children

  • @kulansky2002
    @kulansky20022 жыл бұрын

    is that example of children component props still available? Got some errors

  • @kulansky2002

    @kulansky2002

    2 жыл бұрын

    nvm it was my bad, thanks a lot for clear tutorials greetings from PL

  • @zakirbangash3185
    @zakirbangash31852 жыл бұрын

    Kinldy don't forget to make tutorial on Redux toolkit with typescript

  • @Temp-pn4lm
    @Temp-pn4lm2 ай бұрын

    I like how the strategy is to write normal react code and then do smth to fix the errros

  • @AndriusLau
    @AndriusLau2 жыл бұрын

    And what about JSX.Element instead of ReactNode: interface OscarProps { children: JSX.Element } export const Oscar: React.FC = (props) => { return {props.children} };

  • @NoumanKhan-ck7vx
    @NoumanKhan-ck7vx2 жыл бұрын

    instead of this type Childerns = { children: React.ReactNode; }; even if i do type Childerns = { children: any; }; why it is still working both are same ?? (7:04 vedio length)

  • @davidschreiter1483
    @davidschreiter14838 ай бұрын

    1. declaring possible props i.e specific strings @ 3:00 2. children: React.ReactNode for passing components as children @ 6:23 3. optional prop @ 8:11 ex. messageCount?: number Overview: @9:18

  • @chesterxp508
    @chesterxp508 Жыл бұрын

    GoodJob!

  • @paschalokafor9043
    @paschalokafor9043 Жыл бұрын

    You can also use propsWithChildren generic type for children

  • @timacorn2536
    @timacorn2536 Жыл бұрын

    Can someone explain why 'children' was used in the HeadingProps? Seemed to come out of nowhere

  • @asifuzzamanbappy1297

    @asifuzzamanbappy1297

    Жыл бұрын

    passing children as a prop is a thing in react....

  • @dand4485
    @dand44852 жыл бұрын

    Great course so far. Not sure if others are running into issues when updating the Greet component to default to zero upon updating to make it optional? Not sure if it is the best way, but got around it with doing this: const Greet = (props:GreetProps) => { let mCount if( props.msgCount === undefined) { mCount = 0; } /* The rest of the code... */ When trying to de-structure as the current video shows: const {msgCount=0} = props.msgCount; I'm getting an error something like: Property 'msgCount' does not exist on type 'number | undefined'. FYI . "typescript": "^4.1.2", I'm assuming my typescript is the latest i just installed today fresh, didn't specify a version so i'm assuming i'm on the latest? Also to be complete did try: npm install -g typescript@latest no change :( Just in case others run into the same issue. You can use my old fashion tried and and true way :)

  • @scott-johnston

    @scott-johnston

    2 жыл бұрын

    I had the same issue, but realised I forgot to change my JSX and remove "props." from the ${props.messageCount}. When I made the change I now correctly get 0 unread messages instead of undefined unread messages. It's in the video, I just missed it. So the line should now read: ? `Welcome ${props.name}! You have ${messageCount} unread messages`

  • @mrrishiraj88
    @mrrishiraj882 жыл бұрын

    🙏👍

  • @MyALPHAguy
    @MyALPHAguy Жыл бұрын

    Status not working... why?

  • @ragibshahariarayon7975

    @ragibshahariarayon7975

    Жыл бұрын

    if the error is: Variable is used before being assigned (TypeScript) then use: let message: string = "";

  • @MohammedAlziko
    @MohammedAlziko5 ай бұрын

    ❣❣❣💯💯💯

  • @irotv7584
    @irotv7584 Жыл бұрын

    You sound like freeze youtuber, am I wrong ?

  • @Bradcopo
    @Bradcopo2 жыл бұрын

    😋😋

  • @sulochanakharat9033
    @sulochanakharat90332 жыл бұрын

    Sir are you Indian ?? If yes please make vedio in hindi 🙏🙏🙏

  • @VigneshwaranChandrasekaranA

    @VigneshwaranChandrasekaranA

    2 жыл бұрын

    Learn English