Composing your React JS components with Typescript string literals makes it easy for development

preview_player
Показать описание
In this video, I am going to talk about one of the amazing feature of Typescript and that's String Literals. While defining interfaces, we can use String literals to fix on some selected values for certain props in a React component. This ensures that when someone else is using that component, they will know what all things are supported by the component and how it really to very quickly implement the component without looking at the source code which is a very common thing to do in any JS kind of component.
Рекомендации по теме
Комментарии
Автор

I use typescript because the help i get from IDE including the auto correction is a lifesaver

hansjaru
Автор

React with Typescript ❤️.. looking forward More interesting stuffs bro.

jniyaz