Tag: Hooks

post
Hooks

Hooks : Angular Child Component Lifecycle Hooks- ngAfterContentInit, ngAfterContentChecked, ngAfterViewInit, ngAfterViewChecked

Hooks :  Lifecycle hooks are a set of methods in Angular that are executed at specific moments during the lifecycle of a component. By using these methods, one can execute custom logic or activities at certain points in the Angular component lifecycle.Lifecycle hooks are timed methods. The reasons and ...

post
Hooks

Hooks : Angular Component Lifecycle Hooks- ngOnChanges, ngOnInit, ngDoCheck, ngOnDestroy

Hooks : Lifecycle hooks are a set of methods in Angular that are executed at specific moments during the lifecycle of a component. By using these methods, one can execute custom logic or activities at certain points in the Angular component lifecycle.Lifecycle hooks are timed methods. The reasons and timing...

post
Hooks

Hooks : React Custom Hooks

Hooks : Hooks are reusable functions.Custom Hooks start with "use".Lets create a common service/ hook to fetch data from any type of API A CustomUse our custom hook import { useState, useEffect } from "react";const useRetrieveAPI = (url) => {    const [records, setRecrods] = useState(null);&nbs...

post
Hooks

Hooks : React useMemo Hook

Hooks : useMemo in React is essential react hook for improving the performance and speed of your application by caching the output in the computer memory.Whenever the React memo hooks are asked to perform another operation with the same value/output, the old result will be returned without needing to waste ...

post
Hooks

Hooks : React useCallback Hook

Hooks : What Is Memoization?Memoization: When a complex function is memorised, it retains its result until it is called again with the same input. It’s similar to caching, It may return the result more quickly because it has already been calculated, avoiding any complicated computations. The useCallbac...

post
Hooks

Hooks : React useReducer Hook

Hooks : The useReducer hook is similar to the useState hook. However it's able to handle more complex logic regarding the state updates. It allows for custom state logic.// your custom logicimport { useReducer } from 'react';function reducer(state, action) {    // ...}function MyComponent() { ...

post
Hooks

Hooks : React useRef Hook

Hooks : useRef hook maintains the referenced object's state between re-renders inside a functional component.UseRef accepts an initial value as an input and contains a property called "current" that may be used to retrieve the value of the referenced object at any time. By changing the current value, you ca...

post
Hooks

Hooks : React useContext Hook

Hooks : Props are typically used in React applications to transmit data top-down, or from parent to child. However, this can be challenging for some prop types, like locale preference or UI theme, which are needed by numerous components that are nested at different levels within the application. Instead of ...

post
Hooks

Hooks : React useEffect Hook

Hooks : With the help of the useEffect Hook, you can add timers, fetch data, and directly update the DOM or performing other side effects (an action) in your components. Hooks are equivalent to componentDidMount(), componentDidUpdate(), and componentWillUnmount() lifecycle methods. Side effects have common ...

post
Hooks

Hooks : React Hooks

Hooks : Version 16.8 of React introduced hooks.Hooks allow Function components to access state and other React capabilities. Class components are therefore typically no longer required.Rules While using Hooks:-- Hooks are allowed in Function components only. - Hooks can only be called at the top level of a ...

Hooks: & More

About Us

Community of IT Professionals

A Complete IT knowledgebase for any kind of Software Language, Development, Programming, Coding, Designing, Networking, Hardware and Digital Marketing.

Instagram