Md Mehedi Hasan

4 Mar (4 Days ago)

08 min read

How to get your first job as a self-taught programmer

#programmer #developer

Musfiqur Rahman

Mar 08 (3 Days ago)

05 min read

There’s trouble in Startup Nation

#starup #tech

Jisan Khan

Mar 17 (5 Days ago)

10 min read

45 (Most Popular) Best WordPress Themes 2023

#themes #wordpress

Limon Hasan

April 09 (5 Day ago)

07 min read

Learn How to Setup a CI/CD Pipeline from Scratch

#CI/CD #setup

Baized Bali

May 14 (4 Days ago)

13 min read

How Can Low Employee Engagement Hurt Your Workplace?

#Communication #hardwork

Questions:

01: Props vs state

Answer:

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.

02: How does useState work?

Answer:

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

03: Purpose of useEffect other than fetching data.

Answer:

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.

04: How Does React work?

Answer:

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