Michael J. Ryan
1 min readFeb 11, 2019

--

All modern browser transform (babel, typescript) supports static properties, you don’t need to declare propTypes outside the class. Especially if you are using TypeScript…

class Foo extends React.Component {
static propTypes = { ... };
...
}

--

--

Michael J. Ryan
Michael J. Ryan

Written by Michael J. Ryan

Food nerd (keto, omad, carnivore) — Programmer and JavaScript junkie! (node.js, mongodb, browser)

No responses yet