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
Copy file name to clipboardExpand all lines: docs/code_style.md
+8-1Lines changed: 8 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -79,4 +79,11 @@ class MyComponent extends React.Component {
79
79
// code goes here...
80
80
}
81
81
}
82
-
```
82
+
```
83
+
84
+
## React Hooks
85
+
Existing code will be kept class-based and will only be changed to functional components with hooks if it improves readability or makes things more reusable.
86
+
87
+
For new components it's OK to use hooks with functional components but don't mix hooks & class-based components within a feature - just for code style / readability reasons.
88
+
89
+
Read more about hooks in the [React hooks introduction](https://reactjs.org/docs/hooks-intro.html).
0 commit comments