Genpact
Proud winner of ABECA 2024 - AmbitionBox Employee Choice Awards
Filter interviews by
I applied via Naukri.com and was interviewed before Aug 2023. There was 1 interview round.
States are mutable data managed within a component, while props are immutable data passed from parent to child components.
States are managed within a component and can be changed using setState method
Props are passed from parent to child components and are immutable
States are used for internal component data management, while props are used for passing data between components
Example: A counter component may have a stat...
Data can be passed from children to parents in React components by using callback functions.
Use callback functions to pass data from child components to parent components
Parent component passes a function as a prop to child component
Child component calls the function with the data as an argument to pass data to parent component
I applied via Recruitment Consulltant and was interviewed in Oct 2024. There were 2 interview rounds.
DOM tree is a hierarchical representation of HTML elements in a web page.
DOM stands for Document Object Model.
It is a tree-like structure where each node represents an HTML element.
The DOM tree is created by the browser when a web page is loaded.
It allows JavaScript to manipulate the content, structure, and style of a web page.
Props are immutable and passed from parent component, while state is mutable and managed within the component.
Props are read-only and cannot be modified by the component receiving them.
State is mutable and can be changed by the component that owns it.
Props are passed from parent to child components, while state is managed within the component itself.
Example: Props can be used to pass data from a parent component to a c...
Redux is a predictable state container for JavaScript apps. It is used to manage application state in a centralized way.
Use Redux when you have complex state management needs in your application.
Redux is helpful for large applications with many components that need access to the same state.
Avoid using Redux for simple applications with minimal state management requirements.
Consider using React's built-in state manageme...
Remove elements from source array present in another array passed to a function
Loop through elements in source array and check if they exist in the other array
If an element is found in both arrays, remove it from the source array
DOM tree is a hierarchical representation of HTML elements in a web page.
DOM stands for Document Object Model
It is a tree-like structure where each node represents an HTML element
The root node is the element, followed by
and elementsNodes can have parent-child relationships, siblings, and descendants
JavaScript can manipulate the DOM to dynamically update the content and structure of a web page
React lifecycle methods are methods that are invoked at different stages of a component's life cycle.
Some lifecycle methods include componentDidMount, componentDidUpdate, componentWillUnmount, etc.
In functional components, we can achieve similar functionality using useEffect hook.
For example, useEffect with an empty dependency array can mimic componentDidMount, while useEffect with dependencies can mimic componentDidUp
Redux is a predictable state container for JavaScript apps.
Redux is a state management library commonly used with React.
It helps in managing the state of the application in a predictable way.
Redux follows a unidirectional data flow architecture.
Actions are dispatched to update the state, which is stored in a single immutable state tree.
Reducers are pure functions that specify how the state should change in response to
The 'any' type in TypeScript is used when the type of a variable is not known during development.
Use 'any' when working with dynamic data types or when the type cannot be determined at compile time.
Avoid using 'any' as much as possible to maintain type safety and improve code quality.
Consider using 'unknown' type instead of 'any' for better type checking and error prevention.
Checklist for improving performance of React application
Use React.memo or PureComponent for optimizing rendering
Avoid unnecessary re-renders by using shouldComponentUpdate or React.memo
Use code splitting to load only necessary components
Optimize state management with libraries like Redux or Context API
Minimize the use of inline styles and prefer CSS stylesheets for better performance
Counter application using Reactjs
Create a React component for the counter
Use state to keep track of the count
Implement functions to increment and decrement the count
Display the count on the screen
I applied via Naukri.com and was interviewed in Nov 2024. There was 1 interview round.
Flatten an array without using inbuilt methods
Use recursion to iterate through the array and flatten it
Create a new array to store the flattened elements
Check if each element is an array, if so, recursively call the function to flatten it
useSelector is a hook provided by React-Redux for accessing the Redux store state in functional components.
Allows functional components to access the Redux store state without connecting to the store
Accepts a selector function as an argument to specify which part of the state to extract
Automatically subscribes to the Redux store updates and re-renders the component when the selected state changes
Optimization in React involves improving performance and efficiency of the application.
Use shouldComponentUpdate or PureComponent to prevent unnecessary re-renders
Avoid using inline functions in render method to prevent re-renders
Use keys in lists to help React identify which items have changed
Splitting components into smaller ones can improve performance
Use React.memo for functional components to memoize the result
JSX is a syntax extension for JavaScript used in React to write HTML-like code within JavaScript.
JSX allows developers to write HTML-like code directly in their JavaScript files
It makes the code more readable and easier to understand
JSX gets transpiled into regular JavaScript by tools like Babel before being rendered by the browser
Redux flow in React involves actions, reducers, store, and components to manage state in a centralized manner.
Actions are dispatched to describe what happened in the application.
Reducers specify how the state changes in response to actions.
Store holds the state of the application.
Components can connect to the store to access and update the state.
Redux is a predictable state container for JavaScript apps. It helps manage the state of an application in a more organized way.
Redux is a state management tool commonly used with React to manage the state of an application.
It follows a unidirectional data flow, where the state is stored in a single store.
Actions are dispatched to update the state, and reducers specify how the state should change in response to actions...
Context API is used in React to pass data through the component tree without having to pass props down manually at every level.
Avoids prop drilling by providing a way to share values like themes, user data, etc. across the component tree.
Helps in managing global state in React applications.
Context API consists of Provider and Consumer components to provide and consume the context data.
Can be used for theming, localizat
I applied via Company Website and was interviewed in Jun 2024. There were 2 interview rounds.
Got a link on mail to give online clearance test. 25 questions on react, Js and html-css
I applied via Recruitment Consulltant and was interviewed in Nov 2023. There were 3 interview rounds.
Progress bar in react and remote data fetching
Process Developer
36.1k
salaries
| ₹1 L/yr - ₹6.8 L/yr |
Process Associate
28k
salaries
| ₹0.9 L/yr - ₹7 L/yr |
Assistant Manager
19.8k
salaries
| ₹5 L/yr - ₹14 L/yr |
Management Trainee
19.1k
salaries
| ₹1.6 L/yr - ₹8.5 L/yr |
Manager
7.4k
salaries
| ₹5.7 L/yr - ₹23.8 L/yr |
Accenture
Capgemini
TCS
Cognizant