mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-11 08:46:20 +00:00
add react hooks section
This commit is contained in:
@@ -79,4 +79,11 @@ class MyComponent extends React.Component {
|
||||
// code goes here...
|
||||
}
|
||||
}
|
||||
```
|
||||
```
|
||||
|
||||
## React Hooks
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
Read more about hooks in the [React hooks introduction](https://reactjs.org/docs/hooks-intro.html).
|
||||
|
||||
Reference in New Issue
Block a user