DEV Community

Cover image for TypeScript Types or Interfaces for React component props

TypeScript Types or Interfaces for React component props

Ronald Rey on February 03, 2020

Photo by Simone Hutsch on Unsplash When writing React components with TypeScript, you have two options when it comes to typing its props. You can ...
Collapse
 
brianmanchester profile image
Brian Manchester •

Great explanation of the pros and cons of types vs interfaces with props. I've been looking for a clear, helpful take on this, and I've found it here.

Collapse
 
jzhang300 profile image
James Zhang •

Great post!

Collapse
 
devz3n profile image
Apolo Pena •

Really impressive stuff here. I love the takeways 🚀 Thank you!

Collapse
 
veresur profile image
Tamas Veres •

so helpful tysm

Collapse
 
kwennb profile image
KwennB •

Thank you so much Ronald!

Collapse
 
truongluu profile image
Lưu Xuân Trường •

Awesome, Thank you very much

Collapse
 
artem profile image
Artem •

Very good post, it will help me explain to my mentee what to use better, type or interface 😅.

Thank you!

Collapse
 
developergovindgupta profile image
Govind Prasad Gupta •

I think type alias is better and more clear

Collapse
 
goodeats profile image
Pat Needham •

Just came across this while considering this topic for a personal project. This was a fantastic rundown. Thank you!

Collapse
 
wuwenxian profile image
wuwenxian •

WoW! Thanks!

Collapse
 
emmaroland32 profile image
Iyanda Segun •

Very Insightful.....Thanks