4 Mar (4 Days ago)
08 min read
Mar 08 (3 Days ago)
05 min read
Mar 17 (5 Days ago)
10 min read
April 09 (5 Day ago)
07 min read
May 14 (4 Days ago)
13 min read
Props: Props, on the other hand,make components reusable by giving components the ability to receive data from the parent component in the form of props.
State : State is referred to the local state of the component which cannot be accessed and modified outside of the component and only can be used & modified inside the component.
useState useState is React Hook that allows you to add state to a functional component. It returns an array with two values: the current state and a function to update it. The Hook takes an initial state value as an argument and returns an updated state value whenever the setter function is called
useEffectThe useEffect hook in React is used to perform side effects in function components. While fetching data from an API is one common use case for useEffect, there are several other purposes for which it can be used: Updating the document title: You can use useEffect to update the document title based on the state of your component. Animations: useEffect can be used to trigger animations based on state changes Timer functions: You can use useEffect to set up and cancel timer functions in your component.
React. js The React. js framework is an open-source JavaScript framework and library developed by Facebook. It's used for building interactive user interfaces and web applications quickly and efficiently with significantly less code than you would with vanilla JavaScript.
Copyright © MD Mehedi Hasan | HmdMehedi2016@gmail.com