Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion docs/code_style.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).