0% found this document useful (0 votes)
7 views4 pages

React Question

Uploaded by

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

React Question

Uploaded by

ankur kushwaha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

React Question

Q: What is the role of React in software development?

React helps build fast, interactive, and maintainable web UIs by using
reusable components

Q: What is SPA?

A Single Page Application (SPA) is a web application that have only one
single web page.

Whenever user do some action on the website, then in response content


is dynamically updated without refreshing or loading a new page.

Q. What are the advantages of React? V. IMP.

1. Simple to build Single Page Application (by using Components)

2. React is cross platform and open source(Free to use)

3. Lightweight and very fast (Virtual DOM)

4. Large Community and Ecosystem Joby

5. Testing is easy

Q. React vs Angula
Q: What is DOM

The DOM(Document Object Model) represents the web page as a tree-like


structure which allows JavaScript to dynamically access and manipulate
the content and structure of a web page.

Q: The key difference between the DOM (Document Object Model)


and the Virtual DOM is:

React uses a virtual DOM to efficiently update the UI without re-rendering


the entire page. This helps improve performance and make the
application more responsive.

Q: what is react component

a component is a reusable building block for creating user interfaces

Q: What is JSX?

JSX (JavaScript XML) is a syntax extension for JavaScript that looks like
HTML and is used in React to describe the UI.

Q: Can a browser read JSX? What is Babel?

 Browsers cannot read JSX directly.

 Babel is a tool that converts JSX into regular JavaScript that


browsers can understand.

Q: What is a Transpiler?

A transpiler converts code from one version/language to another. For


example, Babel converts JSX/ES6 code into plain JavaScript.

Q: Is it possible to use JSX without React?

Yes, it's possible to use JSX without React by creating your own transpiler
like Babel.
However, this is not recommended since JSX is tightly integrated with
React and relies on many React-specific features.

Q: What is a Fragment in React?

Fragment lets you group multiple elements without adding extra


nodes(Tag) to the DOM.

Q: What is map() in React?

map() is used to iterate over an array and return a new array.


Q: What are props in JSX?

Props (short for properties) are used to pass data from a parent
component to a child component.

Q: What are spread operators?

The spread operator ... is used to copy or pass all properties of an


object/array easily.

You might also like