Add office photos
Employer?
Claim Account for FREE

Capgemini Engineering

3.5
based on 2.1k Reviews
Filter interviews by

10+ Ethiraj Associates Interview Questions and Answers

Updated 5 Feb 2024
Popular Designations

Q1. What are Hooks in React? Name the ones you have used in your project.

Ans.

Hooks are a feature introduced in React 16.8 that allow developers to use state and other React features in functional components.

  • useState() - for managing state in functional components

  • useEffect() - for performing side effects in functional components

  • useContext() - for accessing context in functional components

  • useReducer() - for managing complex state and actions in functional components

  • useCallback() - for memoizing functions in functional components

  • useMemo() - for memoizing...read more

View 1 answer

Q2. What are Higher Order Functions and Higher Order Components. Give examples.

Ans.

Higher Order Functions are functions that take other functions as arguments or return functions as their results.

  • Higher Order Functions can be used to create reusable code by abstracting common functionality into a separate function.

  • They can also be used to implement functional programming concepts like currying and composition.

  • Example: Array.prototype.map() is a higher order function that takes a callback function as an argument and applies it to each element of an array, re...read more

View 1 answer

Q3. How does Event Loop works? What are Event Queue and Event Stack?

Ans.

Event Loop is a mechanism that allows JavaScript to handle asynchronous operations.

  • Event Loop is a continuous process that checks the Event Queue and moves events to the Event Stack.

  • Event Queue holds all the events that are waiting to be processed.

  • Event Stack holds the events that are currently being processed.

  • When the Event Stack is empty, the Event Loop checks the Event Queue for new events.

  • JavaScript uses Event Loop to handle asynchronous operations like setTimeout(), setI...read more

Add your answer

Q4. Difference between Let, Const and Var. Write code and explain.

Ans.

Let, Const, and Var are used to declare variables in JavaScript with different scoping and reassignment abilities.

  • Var has function scope and can be redeclared and reassigned.

  • Let has block scope and can be reassigned but not redeclared.

  • Const has block scope and cannot be reassigned or redeclared.

View 1 answer
Discover Ethiraj Associates interview dos and don'ts from real experiences

Q5. How can you optimize a React App?

Ans.

Optimizing a React app involves reducing bundle size, using lazy loading, and optimizing rendering performance.

  • Reduce bundle size by code splitting and using dynamic imports

  • Use lazy loading to load components only when needed

  • Optimize rendering performance by using shouldComponentUpdate and PureComponent

  • Use React.memo to memoize functional components

  • Avoid unnecessary re-renders by using useMemo and useCallback

  • Use performance profiling tools like React DevTools and Chrome DevTo...read more

Add your answer

Q6. What are state and props. Difference.

Ans.

State and props are two important concepts in React. State represents the internal data of a component, while props are used to pass data from a parent component to a child component.

  • State is mutable and can be changed within a component.

  • Props are read-only and cannot be modified within a component.

  • State is used to manage component-specific data, while props are used for inter-component communication.

  • State is initialized and managed within a component, while props are passed ...read more

View 1 answer
Are these interview questions helpful?

Q7. Difference between Local and Session Storage

Ans.

Local Storage is persistent storage that remains even after the browser is closed, while Session Storage is temporary and is cleared when the browser is closed.

  • Local Storage has no expiration date, while Session Storage is cleared when the session ends

  • Local Storage can store larger amounts of data compared to Session Storage

  • Local Storage is accessible across different browser tabs and windows, while Session Storage is limited to the current tab or window

  • Local Storage can be a...read more

View 1 answer

Q8. Difference between Promise and Async-Await?

Ans.

Promise is a callback function that returns a value in the future. Async-Await is a syntax that simplifies working with Promises.

  • Promises are used to handle asynchronous operations and avoid callback hell.

  • Async-Await is a syntax that allows writing asynchronous code that looks like synchronous code.

  • Async-Await is built on top of Promises and uses the same underlying mechanism.

  • Async-Await can only be used within an async function.

  • Async-Await can handle errors using try-catch b...read more

Add your answer
Share interview questions and help millions of jobseekers 🌟

Q9. What is Hoisting in JS?

Ans.

Hoisting is a JavaScript behavior where variable and function declarations are moved to the top of their scope.

  • Hoisting applies to both variable and function declarations.

  • Variable declarations are hoisted but not their initializations.

  • Function declarations are fully hoisted, including their definitions.

  • Hoisting can lead to unexpected behavior if not understood properly.

View 1 answer

Q10. What are Closures in JS?

Ans.

Closures are functions that have access to variables in their outer scope, even after the outer function has returned.

  • Closures are created when a function is defined inside another function.

  • The inner function has access to the outer function's variables and parameters.

  • Closures can be used to create private variables and methods.

  • Closures can also be used to create functions with pre-set arguments.

Add your answer

Q11. What is Context API?

Ans.

Context API is a feature in React that allows data to be passed down the component tree without manually passing props at each level.

  • Context API provides a way to share data between components without the need for prop drilling.

  • It consists of two main components: Provider and Consumer.

  • The Provider component allows data to be provided and accessed by any component within its subtree.

  • The Consumer component allows components to consume the data provided by the Provider.

  • Context A...read more

View 1 answer

Q12. Explain Redux workflow.

Ans.

Redux is a state management library for JavaScript applications, providing a predictable and centralized workflow.

  • Redux follows a unidirectional data flow pattern.

  • The application state is stored in a single JavaScript object called the store.

  • Actions are dispatched to describe state changes.

  • Reducers are pure functions that specify how the state should change based on the dispatched actions.

  • Selectors are used to extract specific data from the store.

  • Middleware can be used to add...read more

View 1 answer
Contribute & help others!
Write a review
Share interview
Contribute salary
Add office photos
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top React Developer Interview Questions from Similar Companies

3.4
 • 17 Interview Questions
3.8
 • 15 Interview Questions
View all
Share an Interview
Stay ahead in your career. Get AmbitionBox app
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
70 Lakh+

Reviews

5 Lakh+

Interviews

4 Crore+

Salaries

1 Cr+

Users/Month

Contribute to help millions

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter