Amy Blankenship
Mar 20, 2022

--

In your #4 point, you contradict your #1 point. Why can't you use the ReadOnly utility type to achieve consistency here? Aside from the fact that now your point #5 is a little sketch. Also you might want to look at your first gist, because I suspect you didn't really mean for Props to be {someProps: string & DefaultProps} (is that even valid TypeScript?)

In your point #7, why can't you declare children in your props, since it comes in on props?

--

--

Amy Blankenship
Amy Blankenship

Written by Amy Blankenship

Full Stack developer at fintech company. I mainly write about React, Javascript, Typescript, and testing.

No responses yet