How To Create Your Own Hooks in React | #29 React Course

Опубликовано: 16 Октябрь 2024
на канале: Code with Sloba
1,931
70

In this video, we'll explore how to create your own (custom) hooks in React, a powerful feature that allows us to extract reusable logic from components and share it across our application. We'll start by discussing the basics of hooks in React and how they work, then dive into the concept of custom hooks and how we can create our own.

We'll also discuss best practices for creating and using custom hooks in our applications.

Whether you're new to React or a seasoned pro, this video will give you a solid understanding of custom hooks and how they can help you write more modular, reusable code.

🧿 I discussed:


✔️ How to create a custom hook in React
✔️ Why you should use custom hooks in React


************************************************************
Previous Video:    • useMemo Hook in React | #28 React Course  
Next video:    • Compound Pattern in React | #30 React...  
Full series    • Full React Course  
************************************************************


0:00 Intro
1:35 Adding more form elements
3:15 Creating a custom hook
5:40 Using a form custom hook
7:40 Outro


************************************************************

👉 Patreon:
✔️   / codewithsloba  


👉 Become a better developer with 2 minutes a day:
✔️https://codewithsloba.com


👉 Linkedin:
✔️   / slobodan-gajic  


👉 Instagram:
✔️  / codewithsloba