0% found this document useful (0 votes)
2 views

Assignment 1

ReactJS is an open-source JavaScript library for building user interfaces, particularly single-page applications, with reusable UI components. Its main features include component-based architecture, JSX syntax, one-way data binding, and efficient state management. React components can be functional or class-based, allowing developers to create independent and reusable building blocks for their applications.

Uploaded by

Rohit Jadhav
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Assignment 1

ReactJS is an open-source JavaScript library for building user interfaces, particularly single-page applications, with reusable UI components. Its main features include component-based architecture, JSX syntax, one-way data binding, and efficient state management. React components can be functional or class-based, allowing developers to create independent and reusable building blocks for their applications.

Uploaded by

Rohit Jadhav
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Q What is ReactJS and why is it used?

Ans
React is a open source JavaScript library for building user interface it is used to
build single page application and allow to create reusable UI component. A key
advantage of react is rely on re -render those part of the page that have been changed
avoiding unnecessary re-rendering of unchanged DOM element.

Why react
It allow developer on easy way to create application with a lot of functionality at once
this mean our app doesn’t need to be complicated as other framework instead you cab
focus on building feature in your app
Jsx syntax for extends HTML : using reactjs allow to use declarative html syntax directly
in your code it decode html and creating dom tree and then manipulating them with
javascript

Q What are the main features of ReactJS? What is the meaning of the term SPA?
Ans
Component based architecture – where the ui broken down into resuable component It
can be class based or functional
2 jsx – react uses jsx a syntax extension that allow developer to write html inside JS
3 one way data binding – react uses one way data binding meaning data flow in a single
direction from parent to child component via props
4 state management – react mange component state efficiently using the useState hook
for functional / component or this state for class component

Q What are React components and their types?


Ans
React component are independent reusable building block in a react application that
define what gets displayed on the ui they accept input called props and return react
element describing ui. Component can be reused across different parts of the application
to maintain consistency and reduce code duplication
Functional component
Functional components are similar and preferred for most use cases. They are javascript
function that return react element with the introduction of react hook functional
components can also manage state and lifecycle event

Class component
Class component are ES6 classes that extends react.components they include additional
features like state management and lifecycle method

You might also like