An open API service indexing awesome lists of open source software.

https://github.com/shiponcs/reactjs-hooks-with-elaborate-use-cases

This repo shows many use cases of almost all ReactJS hooks with a few explanation as a comment to particular source file.
https://github.com/shiponcs/reactjs-hooks-with-elaborate-use-cases

hooks-api hooks-api-react react-hooks reactjs

Last synced: 3 months ago
JSON representation

This repo shows many use cases of almost all ReactJS hooks with a few explanation as a comment to particular source file.

Awesome Lists containing this project

README

        

# reactjs-hooks-with-elaborate-use-cases

### It contains almost all of _reactjs hooks_ from basic to advance

- **useState**
- **useEffeect**
- **useCallback**
- **useContext**
- **useRef**
- **useMemo**
- **useReducer**
- **useImperativeHandle**

For good coupling, this repo also contains some use cases of

- createContext
- memo
- createRef
- forwardRef (according to _reactjs docs_, "useImperativeHandle hook should be used with forwardRef")

I took many ideas to arrange this from btholt's https://github.com/btholt/react-hooks-examples/tree/master/ and added more use cases with a bit explanation