Upload Button Icon Add office photos
Engaged Employer

i

This company page is being actively managed by Tech Mahindra Team. If you also belong to the team, you can get access from here

Tech Mahindra Verified Tick

Compare button icon Compare button icon Compare
3.5

based on 34k Reviews

Filter interviews by

Tech Mahindra Reactjs Developer Interview Questions and Answers

Updated 16 Dec 2024

Tech Mahindra Reactjs Developer Interview Experiences

3 interviews found

Interview experience
4
Good
Difficulty level
-
Process Duration
-
Result
-
Round 1 - Technical 

(2 Questions)

  • Q1. What do you mean by redux and how to use redux
  • Ans. 

    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...

  • Answered by AI
  • Q2. What is the use of Context Api in React
  • Ans. 

    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

  • Answered by AI

Skills evaluated in this interview

Interview experience
5
Excellent
Difficulty level
-
Process Duration
-
Result
-
Round 1 - HR 

(1 Question)

  • Q1. Basic of react.js and css

Reactjs Developer Interview Questions Asked at Other Companies

Q1. Implement counter such that it has 2 buttons to increment and dec ... read more
asked in Accenture
Q2. How do you make a page responsive. Bootstrap layouts and alerts
asked in Java R & D
Q3. What are Call, apply and bind methods, what is currying in JavaSc ... read more
Q4. what is ES6 feature small coding on how let,var,const works javas ... read more
asked in Metafic
Q5. Write code for functional component to call an API and show a lis ... read more
Interview experience
3
Average
Difficulty level
Moderate
Process Duration
4-6 weeks
Result
No response

I applied via Recruitment Consulltant and was interviewed in Oct 2022. There were 3 interview rounds.

Round 1 - Resume Shortlist 
Pro Tip by AmbitionBox:
Keep your resume crisp and to the point. A recruiter looks at your resume for an average of 6 seconds, make sure to leave the best impression.
View all tips
Round 2 - Technical 

(1 Question)

  • Q1. First Round is telephonic. Self -introduction, and basics of React js
Round 3 - Technical 

(1 Question)

  • Q1. Second round is video interview. life cycle of react js, dom manipulations, HOC, Redux, React memo, props drilling Javascript: array cloning, object cloning, Data types, Nan

Interview questions from similar companies

Interview experience
3
Average
Difficulty level
Moderate
Process Duration
Less than 2 weeks
Result
Not Selected

I applied via Naukri.com and was interviewed in Dec 2024. There was 1 interview round.

Round 1 - Technical 

(6 Questions)

  • Q1. What is the difference between a development dependency and a regular dependency in software development?
  • Ans. 

    Development dependencies are needed for development and testing, while regular dependencies are needed for the application to run.

    • Development dependencies are used during the development process, such as testing frameworks or build tools.

    • Regular dependencies are required for the application to function properly in production.

    • Development dependencies are typically listed in the devDependencies section of package.json, w...

  • Answered by AI
  • Q2. What do the symbols ^ and ~ represent in the package.json file?
  • Ans. 

    Symbols ^ and ~ in package.json represent version ranges for dependencies.

    • The symbol ^ represents a range that allows minor version updates.

    • The symbol ~ represents a range that allows only patch updates.

    • For example, ^1.2.3 allows any version from 1.2.3 to <2.0.0, while ~1.2.3 allows any version from 1.2.3 to <1.3.0.

  • Answered by AI
  • Q3. How can a 404 page be handled in React routing?
  • Ans. 

    404 page can be handled in React routing by creating a Route component with a path of '*' at the end of all other routes.

    • Create a Route component with a path of '*' at the end of all other routes in the Switch component.

    • Inside the '*' Route component, render a custom 404 page component.

    • Use the Switch component to ensure that only one Route is rendered at a time.

  • Answered by AI
  • Q4. Some Javascript coding questions.
  • Q5. What is the component lifecycle in functional components?
  • Ans. 

    Component lifecycle in functional components involves useEffect hook for side effects.

    • Functional components use useEffect hook to handle side effects like fetching data, subscribing to events, etc.

    • useEffect hook can be used to mimic componentDidMount, componentDidUpdate, and componentWillUnmount lifecycle methods.

    • useEffect hook takes a callback function as its first argument and an optional array of dependencies as its...

  • Answered by AI
  • Q6. Explain redux data flow
  • Ans. 

    Redux data flow is a unidirectional flow of data in React applications using a centralized store.

    • Actions are dispatched to the store

    • Reducers update the state based on the action

    • Components subscribe to the store to access the updated state

  • Answered by AI

Interview Preparation Tips

Topics to prepare for Infosys Reactjs Developer interview:
  • Javascript
  • React.Js
Interview preparation tips for other job seekers - Get your basic cleared and be prepared
Interview experience
3
Average
Difficulty level
Moderate
Process Duration
2-4 weeks
Result
No response

I applied via Recruitment Consulltant and was interviewed in Sep 2024. There was 1 interview round.

Round 1 - Technical 

(16 Questions)

  • Q1. What is hosting and closer
  • Ans. 

    Hosting is the process of storing a website or application on a server, while closure is a function that retains access to variables from its parent scope.

    • Hosting involves storing a website or application on a server to make it accessible on the internet.

    • Closure is a function that retains access to variables from its parent scope, even after the parent function has finished executing.

  • Answered by AI
  • Q2. What is difference between var let and const give me an explanation on what block scope
  • Ans. 

    var, let, and const are used to declare variables in JavaScript. var has function scope, let has block scope, and const is a constant with block scope.

    • var has function scope, meaning it is accessible throughout the function it is declared in.

    • let has block scope, meaning it is only accessible within the block it is declared in.

    • const is similar to let in terms of block scope, but the value cannot be reassigned.

  • Answered by AI
  • Q3. What is asynchronous and how it works
  • Ans. 

    Asynchronous programming allows tasks to run independently of the main program flow, improving performance and responsiveness.

    • Asynchronous code does not block the main thread, allowing other tasks to continue while waiting for a response.

    • Callbacks, promises, and async/await are common ways to handle asynchronous operations in JavaScript.

    • Example: fetching data from an API while the rest of the application continues to r

  • Answered by AI
  • Q4. Tell me the output 1)a = 20; console.log(a); var a; 2)b=10; console.log(b); let b; 3)let a =5; if(a<5){ let b = " a lessthen 5"; }else{ let b = "b is grater then 5"; } console.log(b);
  • Ans. 

    The output for the given code snippets will be: 1) 20 2) ReferenceError: Cannot access 'b' before initialization 3) ReferenceError: b is not defined

    • In the first snippet, variable 'a' is declared using 'var' after it is assigned a value, so it logs 20 without any issues.

    • In the second snippet, variable 'b' is declared using 'let' after it is assigned a value, so it throws a ReferenceError as 'b' is accessed before initia...

  • Answered by AI
  • Q5. Give a div with text and display center of the page and apply animation using HTML and css
  • Ans. 

    Centered div with text and animation using HTML and CSS

    • Create a div element with text inside

    • Apply CSS styles to center the div on the page

    • Use CSS animations to add animation effects

  • Answered by AI
  • Q6. What are semantic tags and explain
  • Ans. 

    Semantic tags are HTML tags that provide meaning to the content they enclose, helping search engines and screen readers understand the structure of a webpage.

    • Semantic tags help improve SEO by providing context to search engines.

    • They also improve accessibility for screen readers by clearly defining the structure of a webpage.

    • Examples of semantic tags include

      ,
      ,

Answered by AI
  • Q7. How can we write responsive for web page
  • Ans. 

    Use media queries, flexible grids, and relative units to create a responsive web page.

    • Use media queries to apply different styles based on screen size

    • Create flexible grids using CSS Grid or Flexbox

    • Use relative units like percentages or ems for sizing elements

    • Consider using frameworks like Bootstrap or Material-UI for responsive design

    • Test your design on different devices and screen sizes

  • Answered by AI
  • Q8. What is the difference between CSS and SASS? what is the use of Sass
  • Ans. 

    SASS is a preprocessor scripting language that is interpreted into CSS, offering more features and flexibility.

    • SASS is a preprocessor for CSS, allowing for variables, nesting, and mixins to be used in stylesheets.

    • SASS code needs to be compiled into CSS before being used in a web project.

    • SASS helps in writing cleaner and more organized CSS code, making it easier to maintain and update styles.

    • CSS is the styling language ...

  • Answered by AI
  • Q9. Event propagation
  • Q10. How would you validate the form using HTML? How do you validate the phone number with the country code?
  • Ans. 

    Form validation can be done using HTML attributes like required, pattern, and maxlength. Phone number validation with country code can be achieved using regex.

    • Use the 'required' attribute to make fields mandatory

    • Use the 'pattern' attribute with regex to validate input format

    • Use the 'maxlength' attribute to limit the number of characters in a field

    • For phone number validation with country code, use regex to match the des...

  • Answered by AI
  • Q11. Which test library you use why it usecase
  • Ans. 

    I use Jest for testing React applications due to its simplicity and integration with React ecosystem.

    • Jest is the most popular test library for React applications

    • It comes pre-configured with Create React App and has great support for snapshot testing

    • Jest also has built-in mocking capabilities which make it easy to test components with dependencies

  • Answered by AI
  • Q12. Tell me mounting and shallow concept in testing library
  • Ans. 

    Mounting is the process of rendering a component into the DOM, while shallow rendering allows testing a component without rendering its children.

    • Mounting is the initial phase of the component lifecycle where the component is rendered into the DOM.

    • Shallow rendering in testing library renders only the component itself, not its children.

    • Shallow rendering is useful for isolating the component being tested and avoiding rend...

  • Answered by AI
  • Q13. What is redux-toolkit and what difference b/w redux and redux-toolkit
  • Ans. 

    Redux Toolkit is the official, recommended way to write Redux logic. It simplifies the process of managing state in React applications.

    • Redux Toolkit provides a set of tools and best practices to streamline Redux development.

    • It includes utilities like createSlice, createReducer, and configureStore to simplify the code and reduce boilerplate.

    • Redux Toolkit also includes built-in Immer integration for writing immutable upd...

  • Answered by AI
  • Q14. How api call handle in redux and how can you get and display user name from redux
  • Ans. 

    API calls in Redux are typically handled using middleware like Redux Thunk. User name can be retrieved from Redux state and displayed in components.

    • Use Redux Thunk middleware to make API calls in Redux

    • Dispatch actions to update Redux state with API response data

    • Access user name from Redux state in components to display it

  • Answered by AI
  • Q15. React hooks and how optimization
  • Q16. Why we need thank in redux
  • Ans. 

    Thunk middleware in Redux allows for asynchronous logic to be handled in Redux actions.

    • Thunk middleware allows for dispatching functions instead of just plain objects in Redux actions.

    • It enables handling asynchronous API calls within Redux actions.

    • Thunk middleware helps in simplifying the code by moving complex logic outside of components.

    • Example: Thunk middleware can be used to dispatch an action after a delay or to f...

  • Answered by AI

    Skills evaluated in this interview

    Interview experience
    4
    Good
    Difficulty level
    Moderate
    Process Duration
    4-6 weeks
    Result
    No response
    Round 1 - Technical 

    (2 Questions)

    • Q1. React basic,event loop, Lazy Loading, Suspense, Javascript basics
    • Q2. Create counter application
    • Ans. 

      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

    • Answered by AI
    Interview experience
    3
    Average
    Difficulty level
    Moderate
    Process Duration
    Less than 2 weeks
    Result
    No response

    I applied via LinkedIn and was interviewed in Oct 2024. There was 1 interview round.

    Round 1 - Technical 

    (3 Questions)

    • Q1. What are the advantages of React
    • Ans. 

      React offers advantages such as virtual DOM for improved performance, reusable components, and easy integration with other libraries.

      • Virtual DOM for efficient updates and improved performance

      • Reusable components for easier development and maintenance

      • Easy integration with other libraries like Redux for state management

      • Support for server-side rendering for better SEO performance

    • Answered by AI
    • Q2. How the performance optimization can be done in React Js Application
    • Ans. 

      Performance optimization in React Js can be achieved through code splitting, memoization, virtualization, and minimizing re-renders.

      • Implement code splitting to load only necessary components when needed

      • Use memoization techniques like useMemo and useCallback to prevent unnecessary re-renders

      • Implement virtualization for long lists or tables to render only visible items

      • Minimize re-renders by using shouldComponentUpdate or

    • Answered by AI
    • Q3. What is the purpose of useMemo and UseCallBack hook
    • Ans. 

      useMemo and useCallback are hooks in React used for optimizing performance by memoizing values and functions respectively.

      • useMemo is used to memoize the result of a function so that it is only recomputed when its dependencies change.

      • useCallback is used to memoize a function instance so that it is not recreated on every render unless its dependencies change.

      • Both hooks help in optimizing performance by preventing unneces...

    • Answered by AI

    Skills evaluated in this interview

    Interview experience
    4
    Good
    Difficulty level
    Moderate
    Process Duration
    2-4 weeks
    Result
    Not Selected

    I applied via Naukri.com and was interviewed in Nov 2024. There was 1 interview round.

    Round 1 - Technical 

    (2 Questions)

    • Q1. Technical and optimization techniques related
    • Q2. Coding questions of java script
    Interview experience
    4
    Good
    Difficulty level
    -
    Process Duration
    -
    Result
    -
    Round 1 - Technical 

    (1 Question)

    • Q1. What is client side and server side rendering
    Interview experience
    5
    Excellent
    Difficulty level
    -
    Process Duration
    -
    Result
    -
    Round 1 - Technical 

    (2 Questions)

    • Q1. Flat the array without using the inbuilt methods
    • Ans. 

      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

    • Answered by AI
    • Q2. Sort the given objects based on the ages

    Tech Mahindra Interview FAQs

    How many rounds are there in Tech Mahindra Reactjs Developer interview?
    Tech Mahindra interview process usually has 1-2 rounds. The most common rounds in the Tech Mahindra interview process are Technical, Resume Shortlist and HR.
    How to prepare for Tech Mahindra Reactjs Developer interview?
    Go through your CV in detail and study all the technologies mentioned in your CV. Prepare at least two technologies or languages in depth if you are appearing for a technical interview at Tech Mahindra. The most common topics and skills that interviewers at Tech Mahindra expect are Javascript, React.Js, HTML, Redux and CSS.
    What are the top questions asked in Tech Mahindra Reactjs Developer interview?

    Some of the top questions asked at the Tech Mahindra Reactjs Developer interview -

    1. What do you mean by redux and how to use re...read more
    2. What is the use of Context Api in Re...read more
    3. Second round is video interview. life cycle of react js, dom manipulations, HO...read more

    Tell us how to improve this page.

    Tech Mahindra Reactjs Developer Interview Process

    based on 3 interviews

    Interview experience

    4
      
    Good
    View more
    Tech Mahindra Reactjs Developer Salary
    based on 52 salaries
    ₹3 L/yr - ₹8.5 L/yr
    At par with the average Reactjs Developer Salary in India
    View more details
    Software Engineer
    26.4k salaries
    unlock blur

    ₹2 L/yr - ₹9.1 L/yr

    Senior Software Engineer
    21.3k salaries
    unlock blur

    ₹5.5 L/yr - ₹23 L/yr

    Technical Lead
    11.6k salaries
    unlock blur

    ₹9.2 L/yr - ₹37 L/yr

    Associate Software Engineer
    5.5k salaries
    unlock blur

    ₹1.8 L/yr - ₹5.9 L/yr

    Team Lead
    4.9k salaries
    unlock blur

    ₹5.2 L/yr - ₹17 L/yr

    Explore more salaries
    Compare Tech Mahindra with

    Infosys

    3.7
    Compare

    Cognizant

    3.8
    Compare

    Accenture

    3.9
    Compare

    Wipro

    3.7
    Compare
    Did you find this page helpful?
    Yes No
    write
    Share an Interview