Add office photos
Employer?
Claim Account for FREE

Tech Prescient

3.7
based on 15 Reviews
Filter interviews by

DIGITAL SEVA ROHISA Interview Questions and Answers

Updated 13 Oct 2024

Q1. What are props in React and how are they different from state

Ans.

Props are used to pass data from parent to child components in React, while state is used to manage data within a component.

  • Props are read-only and cannot be modified by the child component

  • Props are passed down from parent to child components

  • State is mutable and can be changed within the component

  • State is managed internally by the component

Add your answer

Q2. What is axios and used of interceptors in it?

Ans.

Axios is a popular JavaScript library for making HTTP requests in web applications. Interceptors are used to intercept and modify HTTP requests and responses.

  • Axios is a promise-based HTTP client for the browser and Node.js.

  • Interceptors in Axios allow you to run middleware functions before a request is sent or after a response is received.

  • Interceptors can be used for logging, authentication, error handling, and more.

  • Example: Adding a token to the request headers before sending...read more

Add your answer

Q3. What is purpose of keys in React lists?

Ans.

Keys in React lists are used to uniquely identify elements and improve performance by helping React identify which items have changed, are added, or are removed.

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

  • Keys should be unique among siblings but do not need to be globally unique.

  • Using keys improves performance by helping React efficiently update the UI without re-rendering all elements.

  • Keys should be stable, predictable, ...read more

Add your answer

Q4. What are the higher order components?

Ans.

Higher order components are functions that take a component and return a new component with additional functionality.

  • Higher order components are a common pattern in React for code reuse and logic sharing.

  • They are used to abstract logic out of components and make them more reusable.

  • Examples include withRouter, connect, and withStyles in React.

Add your answer
Discover DIGITAL SEVA ROHISA interview dos and don'ts from real experiences

Q5. What is useMemo and useCallback hooks

Ans.

useMemo and useCallback are React hooks used for performance optimization 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 unnecessary re-renders in React components.

Add your answer

Q6. What is callback in JS?

Ans.

A callback in JS is a function passed as an argument to another function, to be executed later.

  • Callback functions are commonly used in event handling, asynchronous programming, and AJAX requests.

  • They allow for more flexible and dynamic code execution.

  • Example: setTimeout(function(){ console.log('Hello') }, 1000);

Add your 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 Software Engineer Interview Questions from Similar Companies

4.0
 • 46 Interview Questions
3.7
 • 36 Interview Questions
4.1
 • 16 Interview Questions
4.1
 • 16 Interview Questions
3.8
 • 14 Interview Questions
3.3
 • 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