https://github.com/selmasaltik/react-custom-hooks
Building Custom React Hooks /// What I learned from "React - The Complete Guide 2024 (incl. Next.js, Redux) - Academind by Maximilian Schwarzmüller"
https://github.com/selmasaltik/react-custom-hooks
react react-custom-hooks react-hooks
Last synced: 3 months ago
JSON representation
Building Custom React Hooks /// What I learned from "React - The Complete Guide 2024 (incl. Next.js, Redux) - Academind by Maximilian Schwarzmüller"
- Host: GitHub
- URL: https://github.com/selmasaltik/react-custom-hooks
- Owner: selmasaltik
- Created: 2024-10-10T23:19:12.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-10-15T22:36:57.000Z (9 months ago)
- Last Synced: 2025-02-14T17:55:04.445Z (5 months ago)
- Topics: react, react-custom-hooks, react-hooks
- Language: JavaScript
- Homepage: https://react-custom-hooks.vercel.app
- Size: 4.16 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Custom Hooks
***Creating & Using Custom React Hooks***- Repetition: **Rules of Hooks**
- **Why** Custom Hooks?
- **Creating** Custom Hooks
- **Using** Custom Hooks**Rules of Hooks**
1. **Only call Hooks *inside of Component or Other Hook Functions***
- React Hooks must not be called outside of React component functions or other Hook functions
2. **Only call Hooks *on the top level***
- React Hooks must not be called in nested code statements (e.g., inside of if-statements)
***Resources***
- [Building Your Own Hooks](https://legacy.reactjs.org/docs/hooks-custom.html)
- [Reusing Logic with Custom Hooks](https://react.dev/learn/reusing-logic-with-custom-hooks)