Skip to content

Commit 9e3b933

Browse files
authored
Revise explanation for declaring class properties
Clarify the declaration of class properties in documentation.
1 parent c299ceb commit 9e3b933

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

docs/basic/getting-started/class-components.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ class App extends React.Component<{ message: string }, { count: number }> {
8484

8585
[View in the TypeScript Playground](https://www.typescriptlang.org/play/?jsx=2#code/JYWwDg9gTgLgBAJQKYEMDG8BmUIjgcilQ3wFgAoCtAGxQGc64BBMMOJADxiQDsATRsnQwAdAGFckHrxgAeAN5wQSBigDmSAFxw6MKMB5q4AXwA0cRWggBXHjG09rIAEZIoJgHwWKcHTBTccAC8FnBWtvZwAAwmANw+cET8bgAUAJTe5L6+RDDWUDxwKQnZcLJ8wABucBA8YtTAaADWQfLpwV4wABbAdCIGaETKdikAjGnGHiWlFt29ImA4YH3KqhrGsz19ugFIIuF2xtO+sgD0FZVTWdlp8ddH1wNDMsFFKCCRji5uGUFe8tNTqc4A0mkg4HM6NNISI6EgYABlfzcFI7QJ-IoA66lA6RNF7XFwADUcHeMGmxjStwSxjuxiAA)
8686

87-
**Class Properties**: If you need to declare class properties for later use, just declare it like `state`, but without assignment:
87+
**Class Properties**: If you need to declare class properties for later use, define them directly within the class `body` without an initial assignment:
8888

8989
```tsx
9090
class App extends React.Component<{

0 commit comments

Comments
 (0)