PokeVideoPlayer v0.9-rev1 - licensed under gpl3-or-later
Views : 78,610
Genre:
Uploaded At Dec 28, 2023 ^^
warning: returnyoutubedislikes may not be accurate, this is just an estiment ehe :3
Rating : 4.915 (72/3,300 LTDR)
97.86% of the users lieked the video!!
2.14% of the users dislieked the video!!
User score: 96.79- Overwhelmingly Positive
RYD date created : 2024-08-27T17:04:45.894482Z
See in json
Top Comments of this video!! :3
I think a really nice thing about react types now is it's not even necessary to either extend from React.HTMLAttributes or React.FC for almost all components. The types already infer the HTML element correctly the moment we return it.
Now the only thing that we must explicitly define is the "children" prop, if we are using it for the component. Even that is super easy, just couple children with React.ReactNode.
3 |
With this “trick” he just canceled his ts docs which are i.e. rendered in storybook. If you want to use react with typescript properly, type react and typescript into a search engine and look at the cheat sheets; not at influencers. Here i.e. instead of creating the interface from a react primitive. Do not couple to react Dom - breaking other renderers like native and server. This also makes the interface totally unusable in other contexts and components. Instead extend on the functional component using its generics i.e. React.FC<CardProps>.
28 |
@reactdom.render
8 months ago
💡Tips:
You can use PropsWithChildren which type is import directly from React instead of declaring type for children prop
6 |