well actually @react.component
is just a shortcut that generates the props type and change the function from accepting labeled arguments to a props object, so doing it manually is not an issue at all!
I have no idea why @react.component
creates a generic props
though, likely because the jsx transform doesn’t have access to types at this point. If it didn’t do that, you would not have to redefine a _props
type, you could actually still use the generated props
type if you don’t mind defining all the type parameters yourself.