0% found this document useful (0 votes)
3 views2 pages

FSD Module 4 Question Bank

The document is a question bank for a Full Stack Development course focusing on React and Express.js. It covers topics such as state management in React, lifting state up, component communication, side effects, RESTful API design, and GraphQL implementation. Each question prompts an exploration of best practices, challenges, and strategies for building scalable applications and efficient APIs.

Uploaded by

acchuprashi119
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)
3 views2 pages

FSD Module 4 Question Bank

The document is a question bank for a Full Stack Development course focusing on React and Express.js. It covers topics such as state management in React, lifting state up, component communication, side effects, RESTful API design, and GraphQL implementation. Each question prompts an exploration of best practices, challenges, and strategies for building scalable applications and efficient APIs.

Uploaded by

acchuprashi119
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
You are on page 1/ 2

FULL STACK DEVELOPMENT (BIS601)

MODULE 4 QUESTION BANK


1. How does React handle state initialization, and what are the potential pitfalls when dealing
with asynchronous state initialization?
Explain how `useState` and class based `this.state` work for initializing state in React
components. What issues can arise when state depends on asynchronous data, and how can you
manage such initialization properly?

2. What is the significance of "lifting state up" in React, and how does it affect component
architecture?
Describe the process of lifting state up in React. Why is it necessary, and what problems does
it solve in managing state between multiple components? Provide an example where lifting state
up improves the flow of data between components.

3. How do you update the state in a React component, and what are the best practices for
managing state updates in a complex application?
Explain the process of updating state both in class components (`this.setState`) and functional
components (`useState`). What are the risks of direct state mutation, and how can you use hooks
like `useEffect` to handle side effects efficiently?

4. How does React handle the communication between components in different levels of the
component tree?
Describe various methods for component communication in React, including props, callbacks,
context, and state management solutions (e.g., Redux). Discuss the trade offs of each approach in
terms of maintainability and performance.

5. How would you design a scalable React component structure for a complex application,
keeping in mind separation of concerns and reusability?
What strategies would you use to design React components that are modular, reusable, and
maintainable in a large scale application? Consider the use of hooks, HOCs (Higher Order
Components), and context for state management.

6. What are the challenges in managing side effects in React (e.g., fetching data, subscribing to
services), and how do you manage them using hooks like `useEffect`?
Explain how side effects like data fetching or subscribing to external services are handled in
React using hooks. What problems can arise with managing multiple asynchronous tasks, and
how can you optimize this process with cleanup, `useEffect`, or libraries like Redux Saga?

7. How does Express.js simplify building RESTful APIs, and what are some common practices
for structuring API routes and middleware?
Describe how Express handles HTTP requests and responses. What are some best practices
for organizing routes and middleware, and how does Express enable efficient request handling
for RESTful APIs?

8. What are the key differences between REST API and GraphQL in terms of performance,
flexibility, and ease of use?
Compare REST and GraphQL from the perspective of querying data, performance (e.g., over
fetching/under fetching), and the flexibility they offer for clients. Discuss when you would prefer
one over the other.

9. How do you implement a strongly typed GraphQL API, and what benefits does this bring to
the development process?
Explain how GraphQL schema definition language (SDL) is used to create a strongly typed
API. How does type safety improve debugging and development efficiency?

10. What are query variables in GraphQL, and how can they be used to make API calls more
dynamic and reusable?
Explain how query variables work in GraphQL and how they allow clients to send dynamic
input to a query. Provide an example of how query variables can optimize API calls.

What is react state? Explain what happens when state changes? Create a script for Initializing and
Modifying State.

Write a snippet to add a button and to handle an event and explain.

List and explain commonly used mapping of CRUD operations to HTTP methods and resources in
Express.

Explain Express request object’s properties.

What is the role of Express Response Objects? Explain briefly.

You might also like