Skip to content
This repository was archived by the owner on Nov 12, 2023. It is now read-only.

Commit 9b95121

Browse files
committed
60. Making the right API choice
1 parent b316acb commit 9b95121

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

README.md

+20-1
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@
6363
- [Passing a user custom reducer](#passing-a-user-custom-reducer)
6464
- [Exposing the internal reducer and types](#exposing-the-internal-reducer-and-types)
6565
- [**Section 12: (Bonus) Classifying the Patterns: How to choose the best API**](#section-12-bonus-classifying-the-patterns-how-to-choose-the-best-api)
66+
- [How the classification works](#how-the-classification-works)
67+
- [Making the right API choice](#making-the-right-api-choice)
6668

6769
## **Section 1: Introduction**
6870

@@ -602,7 +604,6 @@ const withClapAnimation = WrappedComponent => {
602604
### New to hooks?
603605
604606
- [Hooks API Reference](https://reactjs.org/docs/hooks-reference.html)
605-
- [useHooks](https://usehooks.com/)
606607
607608
Basic Hooks
608609
- [Using the State Hook](https://reactjs.org/docs/hooks-state.html)
@@ -642,6 +643,8 @@ useAdvancedPatterns()
642643
Open-source examples
643644
644645
- [react-use](https://github.com/streamich/react-use)
646+
- [useHooks](https://usehooks.com/)
647+
- [beautiful React hooks](https://github.com/beautifulinteractions/beautiful-react-hooks)
645648
- [React Table](https://github.com/tannerlinsley/react-table)
646649
647650
| Pros | Cons |
@@ -2644,4 +2647,20 @@ const Usage = () => {
26442647
26452648
## **Section 12: (Bonus) Classifying the Patterns: How to choose the best API**
26462649
2650+
### How the classification works
2651+
2652+
- User Interface <-> Logic (x-axis)
2653+
- Difficulty (y-axis)
2654+
2655+
**[⬆ back to top](#table-of-contents)**
2656+
2657+
### Making the right API choice
2658+
2659+
| Difficulty | User Interface | User Interface and Logic | Logic |
2660+
| :----------- | :------------------ | :------------------------- | :----------- |
2661+
| Easy | Reusable Styles | Props Collection & Getters | |
2662+
| Intermediate | Compound Components | State Initialisers | Custom Hooks |
2663+
| Hard | | Control Props | |
2664+
| Hard | | State Reducer | |
2665+
26472666
**[⬆ back to top](#table-of-contents)**

classification.png

46.6 KB
Loading

0 commit comments

Comments
 (0)