Add office photos
Engaged Employer

Tech Mahindra

3.6
based on 33k Reviews
Filter interviews by

10+ Interview Questions and Answers

Updated 1 Aug 2024
Popular Designations

Q1. What is the difference between state and props in reaact?

Ans.

State is mutable and managed within a component, while props are immutable and passed from parent to child components.

  • State is used to manage internal data within a component.

  • Props are used to pass data from parent to child components.

  • State can be changed using the setState() method.

  • Props are read-only and cannot be modified by the component receiving them.

  • State is local to a component, while props can be accessed by multiple components.

  • Example: State can be used to store for...read more

Add your answer

Q2. What is React.js and what are its key features?

Ans.

React.js is a JavaScript library for building user interfaces.

  • React.js is a popular front-end library developed by Facebook.

  • It allows developers to build reusable UI components.

  • React.js uses a virtual DOM for efficient rendering and updates.

  • It follows a component-based architecture, making it easy to manage and maintain code.

  • React.js supports server-side rendering for improved performance and SEO.

  • It has a rich ecosystem with a large community and extensive documentation.

Add your answer

Q3. What is React Router, and how does it works?

Ans.

React Router is a library that allows for routing in React applications, enabling navigation between different components.

  • React Router is a popular routing library for React applications.

  • It provides a way to handle navigation and rendering of different components based on the URL.

  • React Router uses a declarative approach, allowing developers to define routes using components.

  • It supports different types of routing, including browser history, hash history, and memory history.

  • Rea...read more

Add your answer

Q4. What is the significance of keys in React list?

Ans.

Keys in React list help identify and track individual items, improving performance and enabling efficient updates.

  • Keys help React identify which items have changed, been added, or been removed in a list.

  • They help improve performance by allowing React to reuse existing DOM elements instead of creating new ones.

  • Keys also help maintain component state and prevent unnecessary re-rendering of components.

  • Keys should be unique within the list and stable across re-renders to ensure p...read more

Add your answer
Discover null interview dos and don'ts from real experiences

Q5. Last and what I learnt in full stack Java

Ans.

I have experience in full stack Java development and have learned various technologies and frameworks.

  • I have worked with Java, Spring Boot, and Hibernate for backend development.

  • I have experience in front-end development using HTML, CSS, and JavaScript.

  • I have used frameworks like Angular and React for building user interfaces.

  • I have knowledge of databases like MySQL and MongoDB for data storage.

  • I have learned about RESTful APIs and have implemented them in my projects.

Add your answer

Q6. What is CSS why are you using a CSS

Ans.

CSS stands for Cascading Style Sheets and is used to style the appearance of web pages.

  • CSS is used to control the layout, colors, fonts, and other visual aspects of a website.

  • It helps in separating the content of a website from its design, making it easier to update and maintain.

  • CSS can be applied inline, internally within the HTML document, or externally in a separate CSS file.

  • Selectors in CSS allow targeting specific elements to apply styles.

  • CSS can also be used for creatin...read more

Add your answer
Are these interview questions helpful?

Q7. What is JSX and why is it used in React.

Ans.

JSX is a syntax extension for JavaScript used in React to write HTML-like code in JavaScript.

  • JSX allows developers to write HTML-like code in JavaScript, making it easier to create and manipulate UI components.

  • It combines the power of JavaScript and HTML into a single syntax, allowing developers to write more expressive and concise code.

  • JSX is transpiled into regular JavaScript code by tools like Babel before being executed by the browser.

  • It helps in creating reusable compone...read more

Add your answer

Q8. What is the rate of 1 out of 10 ?

Ans.

The rate of 1 out of 10 is 10%.

  • The rate of 1 out of 10 can be expressed as a fraction: 1/10.

  • To convert the fraction to a percentage, divide the numerator by the denominator and multiply by 100.

  • In this case, 1 divided by 10 equals 0.1, which when multiplied by 100 gives 10%.

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

Q9. Explain the concept of Vitual DOM in React.

Ans.

Virtual DOM is a concept in React where a lightweight copy of the actual DOM is created and manipulated for efficient rendering.

  • Virtual DOM is a JavaScript representation of the actual DOM.

  • It allows React to efficiently update and render only the necessary parts of the UI.

  • When there are changes in the state or props, React creates a new virtual DOM tree and compares it with the previous one.

  • React then updates only the differences between the two virtual DOM trees in the actua...read more

Add your answer

Q10. Describe the component lifecycle in React.

Ans.

The component lifecycle in React refers to the different stages a component goes through from creation to deletion.

  • The lifecycle methods in React can be divided into three main phases: Mounting, Updating, and Unmounting.

  • During the Mounting phase, the component is created and inserted into the DOM.

  • During the Updating phase, the component can be re-rendered due to changes in props or state.

  • During the Unmounting phase, the component is removed from the DOM.

  • Some commonly used lif...read more

Add your answer

Q11. How does data flow in React?

Ans.

Data flows in React through a unidirectional flow called props and state.

  • Data flows from parent components to child components through props.

  • Child components can modify the data by calling functions passed as props.

  • State is used to manage data within a component and can be updated using setState().

  • Changes in state trigger re-rendering of the component and its child components.

Add your answer

Q12. What is HTML important of html

Ans.

HTML is important for creating the structure of web pages and displaying content on the internet.

  • HTML is the standard markup language used to create web pages.

  • It provides the structure for content on the internet, including text, images, links, and more.

  • HTML elements are used to define the different parts of a web page, such as headings, paragraphs, lists, and tables.

  • It works in conjunction with CSS for styling and JavaScript for interactivity.

  • Example:

    This is a heading

Add your answer

Q13. Why are you using a bootstrap

Ans.

Bootstrap is a popular front-end framework for building responsive and mobile-first websites.

  • Bootstrap provides a grid system for easy layout design

  • It includes pre-designed components like buttons, forms, and navigation bars

  • Bootstrap's responsive utilities make it easy to create mobile-friendly websites

Add your answer

Q14. How does React handle forms?

Ans.

React handles forms using controlled components and state management.

  • React uses controlled components to manage form input state.

  • Form input values are stored in the component's state and updated through event handlers.

  • React provides event handlers like onChange to handle form input changes.

  • Form submission can be handled using onSubmit event handler.

  • Validation and error handling can be implemented using conditional rendering and state management.

Add your answer

Q15. Explain the concept of state in React.

Ans.

State in React is a JavaScript object that stores data and controls the behavior of a component.

  • State is used to manage and update data within a component.

  • It is mutable and can be changed using the setState() method.

  • State allows components to re-render and reflect changes in the UI.

  • State is local and specific to each instance of a component.

  • State can be passed down to child components as props.

Add your answer
Contribute & help others!
Write a review
Share interview
Contribute salary
Add office photos

Interview Process at null

based on 4 interviews in the last 1 year
Interview experience
4.3
Good
View more
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Web Developer Interview Questions from Similar Companies

3.2
 • 18 Interview Questions
3.7
 • 12 Interview Questions
4.1
 • 11 Interview Questions
3.7
 • 10 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
Get AmbitionBox app

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