1
0
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:
AWolf81
2019-05-10 07:30:48 +02:00
committed by Junyoung Choi
parent 9a6ee9d2ef
commit 1601292db7

View File

@@ -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).