Type error regarding React.Component in 05-generics/40
kimroen opened this issue · 1 comments
kimroen commented
In this challenge: src/05-generics/40-generic-class-components.problem.tsx
During and after solving the challenge, this TypeScript error persists:
src/05-generics/40-generic-class-components.problem.tsx:9:28 - error TS2686: 'React' refers to a UMD global, but the current file is a module. Consider adding an import instead.
9 export class Table extends React.Component<TableProps> {
~~~~~
Importing React resolves this issue, but this seems both unnecessary as we'll learn later in the course, and not related to what we're trying to communicate here.
mattpocock commented
Fixed - the React import is required here because it's referenced at runtime, not compile time.