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
Use coupon code CodevolutionKZread for 100% off lifetime discount to your subscription at www.taskade.com/billing
@srshah
10 ай бұрын
I know it is pretty late but the coupon code is giving 10% off not 100%. I wish it gave 100% :)
Superb Video, No rubbish, No clickbait just Pure Content, Thanks for Teaching me React and Nextjs.
@shehzadhussain01
Жыл бұрын
React with Typescript
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.
VIshwas you are incredible!!!!. You present the content really well and planned in each step.
Waiting for the next video on React TypeScript Tutorial. These were amazing well explained and thanks for doing this.
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
Perfect Course ! your voice so clear and very easy to understand. thanks
Your guide is very easy to understand. Thanks so much
Don't stop bro! Nowadays is a mainstream! Thanks
Thank you very much. It's Very Useful to develop React Apps. Your voice is just amazing
awesome, I learned a lot. thanks!
Thank you for the great videos!
So good, thanks a lot!
This is great content...Thank you
Superb videos 🙏🏼
its true when they said typescript is superior, fascinating!
Great tutorial but for the status type I would recommend using an enum instead of union of string literals.
i would recommend to have other payment methods for support. i.e. upi, patron. many people don't use paypal.
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?
Amazing
Awesome!
Quick question, in app.tsx, how does Status only have this: but heading and oscar have ...... and ....?
That is awesome...
Thanks
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
Жыл бұрын
this is object destructuring
amazing
Awesome
Thanks for this tutorial. One questin for the status example, why not use enum?
@Codevolution
2 жыл бұрын
Literals are easier
const { message=0} = props not working. for an optional value its giving unefined in a TS online compiler
Best video
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
11 ай бұрын
Children prop is meant for passing data within the component tag , mainly to render other components as children
is that example of children component props still available? Got some errors
@kulansky2002
2 жыл бұрын
nvm it was my bad, thanks a lot for clear tutorials greetings from PL
Kinldy don't forget to make tutorial on Redux toolkit with typescript
I like how the strategy is to write normal react code and then do smth to fix the errros
And what about JSX.Element instead of ReactNode: interface OscarProps { children: JSX.Element } export const Oscar: React.FC = (props) => { return {props.children} };
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)
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
GoodJob!
You can also use propsWithChildren generic type for children
Can someone explain why 'children' was used in the HeadingProps? Seemed to come out of nowhere
@asifuzzamanbappy1297
Жыл бұрын
passing children as a prop is a thing in react....
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
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`
🙏👍
Status not working... why?
@ragibshahariarayon7975
Жыл бұрын
if the error is: Variable is used before being assigned (TypeScript) then use: let message: string = "";
❣❣❣💯💯💯
You sound like freeze youtuber, am I wrong ?
😋😋
Sir are you Indian ?? If yes please make vedio in hindi 🙏🙏🙏
@VigneshwaranChandrasekaranA
2 жыл бұрын
Learn English