TSX class: unable to use custom props on subcomponents
Version
3.2.23
Reproduction link
Steps to reproduce
- Clone repo + yarn install
- Open src/App.tsx
- View <Foo msg={'Bar'}/>
- Error refers to Intrinsic... not having X key
Meh Solution: Edit the IntrinsicAttributes interface to include [key: string] any to account for custom properties on class components. (runtime-dom.d.ts, line 1507)
What is expected?
At the very least, allow me to compile without raising an error. Ideally, it can infer the available props for a given class component to pair with intellisense.
What is actually happening?
TSC raises an error and blocks build
This is really a pain in the butt to solve without adjusting the types file directly. // @ts-ignore and custom edits to IntrinsicAttributes do not scale well ðŸ˜