1. 4
    Create stateful React Components using TypeScript
    2m 48s

Create stateful React Components using TypeScript

Share this video with your friends

Send Tweet

You can create stateful React Components in TypeScript by extending from the React.Component class. This parent class takes two generic parameters, Props and State.

This lessons shows these generic parameters and React.Component in action.

antmdvs
~ 6 years ago

Hi Basarat, thanks for this course. I noticed you are declaring props and state using type as opposed to interface. What is your guidance on using type vs interface for React props/state?

Basarat Ali Syedinstructor
~ 6 years ago

It deesn't matter in this case : https://basarat.gitbooks.io/typescript/docs/styleguide/styleguide.html#type-vs-interface 🌹