React JS

React JS Redux

Redux offers a centralised store(Single point of truth) for maintaining and updating application state as well as a way to control the flow of data into and out of the store, whereas React offers a method for creating and rendering UI components. You can build data-driven applications that are simple to manage and debug by …

React JS Redux Read More »

React JS useCallback

Here’s an example of using useCallback to improve performance:  useCallback is used to memoize the plus function. The function only changes if setCount changes, so it’s only re-created if setCount is changed. This can improve performance by avoiding unnecessary re-renders.

React JS useEffect

useEffect accepts two arguments. The second argument is optional. useEffect(<function>, <dependency>) 3 types of syntax possibilities. 1. It will run every-time render get calls useEffect(() => {//code}) 2. It will run on first render useEffect(() => {//code}, [ ] ) 3. It will render whenever count changes useEffect( () =>{//code},[count]) Usage Example:

React JS Hook

Here is a table of some of the most commonly used hooks in React along with a brief description: Hook Name Description useState basically it adds state to functional components. useEffect Adds side effects to functional components, such as data fetching API calls or updating the DOM. useContext Accesses context values in functional components and …

React JS Hook Read More »

Scroll to Top