Category: React JS

post
Life Cycle

React JS : React Lifecycle: Methods

React JS :  React component lifecycle & Hooks give developers the ability to manage and modify components from the point of creation to the point of destruction.There are various methods in the react component lifecycle at various stages of a component's lifetime.What is a component??In React, a compo...

post
Hooks

React JS : React Custom Hooks

React JS : 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

React JS : React useMemo Hook

React JS : 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

React JS : React useCallback Hook

React JS : 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

React JS : React useReducer Hook

React JS : 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

React JS : React useRef Hook

React JS : 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

React JS : React useContext Hook

React JS : 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

React JS : React useEffect Hook

React JS : 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
Promise

React JS : React useState Hook

React JS : Use to track state in a function component.The State In General refers to the data or properties that need to be tracking in an application.The Strings, numbers, booleans, arrays, objects, and any combination of these can be tracked with useState Hook!Initialize useStateuseState accepts an initial s...

post
Hooks

React JS : React Hooks

React JS : 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 ...

React JS: & 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