You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
description="Using TypeScript with React class components."
11
+
title="Class Components"
12
+
keywords={['class components']}
13
+
/>
14
+
15
+
# Class Components
16
+
17
+
`React.Component` is used to describe a class component. `React.Component` is a generic type that takes two **_optional_** type variables, `PropType` and `StateType`.
18
+
19
+
The following example is from the [react-typescript-cheatsheet](https://github.com/typescript-cheatsheets/react-typescript-cheatsheet).
Copy file name to clipboardExpand all lines: src/pages/index.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,6 +19,6 @@ Visit the [GitHub repository](https://github.com/AryanJ-NYC/reactandtypescript.d
19
19
20
20
For questions that are not covered in the documentation or to chat about React + TypeScript, join our [Spectrum Chat](https://spectrum.chat/react-and-typescript).
21
21
22
-
A special thank you to [@swyx](https://twitter.com/swyx)'s [React TypeScript cheatsheet](https://github.com/sw-yx/react-typescript-cheatsheet).
22
+
A special thank you to [@swyx](https://twitter.com/swyx) for starting the [React TypeScript cheatsheet](https://github.com/typescript-cheatsheets/react-typescript-cheatsheet) and inspiring the existence of this website.
23
23
24
24
Lastly, tweet me at [@AryanJabbari](https://twitter.com/AryanJabbari). Words of encouragement are always welcome!
0 commit comments