opendevs
opendevs logo
CoursesInterviewsBlogs

Custom hooks in React

Hooks are reusable functions. When you have component logic that needs to be used by multiple components, we can extract that logic to a custom hook.
React.memo, useMemo and useCallback
Loading video...

useWindowSize hook | Custom Hooks in React (in Hindi)

Concepts

    1

    useWindowSize hook | Custom Hooks in React (in Hindi)
    useWindowSize hook | Custom Hooks in React (in Hindi)

    2

    useInitialFetch hook | Custom Hooks in React (in Hindi)
    useInitialFetch hook | Custom Hooks in React (in Hindi)
Watch the full video to earn  3  DevCoin image

Quizzes


1

What are hooks in React?

Question 1 of 7
1  DevCoin image   per question
2

Which concepts are exhibited by custom hooks in React?

Question 1 of 7
1  DevCoin image   per question
3

Can custom hooks internally use React's useEffect and useState hook?

Question 1 of 7
1  DevCoin image   per question
4

States in two different invocations of a custom hook are totally isolated from each other.

Question 1 of 7
1  DevCoin image   per question
5

It is highly recommended to prefix your custom hook's name with use keyword.

Question 1 of 7
1  DevCoin image   per question
6

Is it necessary to use useState, useEffect, or other React hooks to create custom hooks?

Question 1 of 7
1  DevCoin image   per question
7

Can custom hook be used outside React's component tree?

Question 1 of 7
1  DevCoin image   per question

Coding Questions


useToggle Custom hook

medium

2  DevCoin image
opendevs logo
CoursesFAQsContact UsPrivacy PolicyTerms Of Service
Copyright © 2023 opendevs
Learn ● Develop ● Ace
All illustrations by Storyset