Unit 1: Refreshing JavaScript and React Fundamentals - Subjective Questions

INT252 — Web App Development With Reactjs • Practice Questions with Detailed Answers

20 questions

1

Define arrow functions in JavaScript. Explain their syntax, advantages, and handling of the this keyword with suitable examples.

2

Distinguish between var, let, and const with reference to scope, hoisting, redeclaration, reassignment, and the temporal dead zone.

3

Explain how JavaScript array methods support iteration and transformation. Compare forEach, map, filter, reduce, and find with examples relevant to React.

4

Describe array and object destructuring assignments. How are default values, renamed properties, nested values, and function parameters handled through destructuring?

5

Compare the spread and rest operators in JavaScript. Demonstrate how each is used with arrays, objects, and function parameters.

6

Explain ES modules and distinguish between named exports and default exports. How do modules improve the organization of a React application?

7

What is immutability? Explain why immutable state updates are important in React and show how arrays and objects can be updated without mutation.

8

Discuss the functional programming concepts that are most relevant to React, including pure functions, first-class functions, higher-order functions, composition, and avoidance of side effects.

9

Differentiate between shallow copying and deep copying in JavaScript. Explain common copying mechanisms and their limitations.

10

Explain referential equality in JavaScript and its role in React state comparison, dependency checking, and memoization.

11

Compare Single Page Applications (SPAs) and Multi Page Applications (MPAs) in terms of navigation, rendering, performance, routing, SEO, and deployment.

12

Explain React's philosophy and the declarative UI paradigm. Contrast declarative rendering with imperative DOM manipulation.

13

Describe component-based architecture in React. Explain component composition, props, state, reusability, and the benefits of breaking an interface into components.

14

Describe the steps for setting up a React application using Vite. Explain the purpose of the main generated files and common development commands.

15

Explain the major parts of a modern React development environment and tooling setup and state the purpose of each.

16

Propose and explain a feature-based folder structure for a medium-sized React application. What best practices should guide project organization?

17

Explain JSX syntax and expressions. Discuss JavaScript embedding, attributes, fragments, conditional rendering, list rendering, and important JSX restrictions.

18

Describe how React components are rendered into the DOM. Explain the roles of index.html, the root element, createRoot, and StrictMode.

19

Explain functional components and describe their render lifecycle from initial rendering through state or prop updates. Why must rendering remain pure?

20

What are the Virtual DOM and reconciliation? Explain how React compares element trees, uses keys, and updates the real DOM efficiently.