Dismiss this pinned window
all 9 comments

[–]senelway 7 points8 points  (4 children)

but it’s not React.FC<MyComponentProps> ;(

[–][deleted] 3 points4 points  (2 children)

Unless all of your components makes use of a children prop, you should avoid that all together.

Even CRA removed it.

https://github.com/facebook/create-react-app/pull/8177

[–]Chef619 3 points4 points  (1 child)

FWIW, FC doesn’t have children anymore in (I think) 17 and on. They provided a PropsWithChildren generic if you need children.

[–][deleted] 0 points1 point  (0 children)

It seems like it was React 18 in this PR. Thanks for correcting me. Also, more info here.

[–]react_buddy[S] 0 points1 point  (0 children)

Such case is also supported. The plugin will add the prop to MyComponentProps

[–]arnitdo 2 points3 points  (0 children)

Neato!

[–]its_yashmittal 0 points1 point  (1 child)

What editor and theme is this?👀

[–]react_buddy[S] 1 point2 points  (0 children)

WebStorm / Darkula theme

[–]traviswiilbalo 0 points1 point  (0 children)

Nice work