Gold Fitness Club

Select what you wnat to do today

card-img

Morning Walk

Time: 45s

card-img

Lunges

Time: 30s

card-img

Pushups

Time: 40s

card-img

Dumbbell rows

Time: 60s

card-img

Burpees

Time: 45s

card-img

Squats

Time: 30s

Sojib Mondol
72kg
Weight
6.5
Height
30
Age
Add a break
Exercise Details
Exercise time: 0s
Break time:

1. How does react woks?

React is a JavaScript library developed by Facebook which, among other things, was used to build Instagram.com. Its aim is to allow developers to easily create fast user interfaces for websites and applications alike. The main concept of React. js is virtual DOM.

State Management in React

A state is a JavaScript object that represents a part of a component. It changes whenever a user interacts with the application, rendering a new UI to reflect the modifications.

2. Difference between state and props?

PROPS

1. The Data is passed from one component to another.

2. It is Immutable (cannot be modified).

3. Props can be used with state and functional components.

4. Props are read-only.

STATE

1. The Data is passed within the component only.

2. It is Mutable ( can be modified).

3. State can be used only with the state components/class component (Before 16.0).

4. State is both read and write.

3. Use of useeffect in react

The motivation behind the introduction of useEffect Hook is to eliminate the side-effects of using class-based components. For example, tasks like updating the DOM, fetching data from API end-points, setting up subscriptions or timers, etc can be lead to unwarranted side-effects.