I have recently started working with React and getting understanding of how the framework works,
I have two pieces of code below , just wondering that what's the difference between them (of-course I am not asking about the syntactical differences) and why one of them gives error.
this one works
interface Square {
value:String;
}
class Square extends React.Component<Square,{}> {
}
this one gives following error
[ts] Generic type 'Component' requires 2 type argument(s).
class Square extends React.Component {}
I have seen many examples on the net which extend React.Component for writing new components, I think I am missing something here.