DEV Community

Discussion on: Honey, I Type Checked The Children

Collapse
 
lexlohr profile image
Alex Lohr

A fun way to look at PropTypes :) Nicely written.

I see PropTypes increasingly replaced by static type checking, be it Flow or TypeScript. The advantage is that you don't have the overhead and warnings on live and still have the full type checking (and even more versatile one) in development.

What's your opinion on static vs. dynamic type checking?

Collapse
 
laurieontech profile image
Laurie

I'm a big fan of static type checking! But writing something in Typescript isn't as simple as writing JS and adding types; at least not if you want to follow best practices. So dynamic type checking is a nice middle ground. Giving you some of those features without changing what you know.