Add office photos
Engaged Employer

DigiBoxx

2.9
based on 12 Reviews
Filter interviews by

Joshi Multispeciality Hospital Interview Questions and Answers

Updated 5 Feb 2024

Q1. What are Hooks in ReactJs and Explain useState, useRef, useEffect Hooks with their usecases?

Ans.

Hooks are functions that allow us to use state and other React features in functional components.

  • useState is a hook that allows us to add state to functional components.

  • useRef is a hook that allows us to create a mutable reference that persists across renders.

  • useEffect is a hook that allows us to perform side effects in functional components.

  • useState example: const [count, setCount] = useState(0);

  • useRef example: const inputRef = useRef(null);

  • useEffect example: useEffect(() =>...read more

Add your answer

Q2. How can you compose multiple HOCs with render props in a React component

Ans.

Compose multiple HOCs with render props in a React component

  • Create a render prop component that accepts a function as a prop

  • Wrap the render prop component with HOCs

  • Pass the function as a prop to the HOCs

  • Use the function to render the component's content

  • Example: withAuth(withTheme(RenderPropComponent))

Add your answer

Q3. What are Components and state in ReactJs?

Ans.

Components are reusable UI elements in ReactJs. State is an object that stores data and controls a component's behavior.

  • Components are like building blocks that can be combined to create complex UIs

  • State is used to store and manage data within a component

  • Changes to state trigger a re-render of the component

  • State should be kept as minimal as possible to avoid performance issues

  • Example: A button component can have a state that tracks the number of times it has been clicked

Add your answer

Q4. Explain setTimeout, setImmediate and process.nextTick ?

Ans.

setTimeout, setImmediate and process.nextTick are Node.js functions used for asynchronous programming.

  • setTimeout is used to execute a function after a specified amount of time has passed.

  • setImmediate is used to execute a function immediately after the current event loop iteration.

  • process.nextTick is used to execute a function at the beginning of the next event loop iteration.

  • setTimeout and setImmediate are similar, but setImmediate has higher priority in the event loop.

  • proces...read more

Add your answer
Discover Joshi Multispeciality Hospital interview dos and don'ts from real experiences

Q5. What is life cycle in ReactJS ?

Ans.

ReactJS life cycle refers to the series of methods that are invoked in the process of creating, updating and destroying a component.

  • ReactJS life cycle consists of three phases: Mounting, Updating and Unmounting.

  • Mounting phase includes methods like constructor, render, componentDidMount.

  • Updating phase includes methods like shouldComponentUpdate, render, componentDidUpdate.

  • Unmounting phase includes method componentWillUnmount.

  • These methods help in managing the state and props o...read more

Add your answer

Q6. What Algorithm you used in your Project?

Ans.

I used the Dijkstra's algorithm for finding the shortest path in my project.

  • Implemented Dijkstra's algorithm to find the shortest path between nodes in a graph

  • Used priority queue to optimize the algorithm

  • Considered edge weights and node distances while calculating the shortest path

Add your answer

Q7. Purpose of getDerivedStateFromProps() and getSnapshotBeforeUpdate() Lifecyle method?

Ans.

getDerivedStateFromProps() updates state based on props changes. getSnapshotBeforeUpdate() captures current state before update.

  • getDerivedStateFromProps() is called before rendering and updates state based on changes in props.

  • getSnapshotBeforeUpdate() is called after rendering but before updating the DOM. It captures current state before update.

  • getDerivedStateFromProps() is a static method and should return an object to update state or null to indicate no update.

  • getSnapshotBe...read more

Add your answer

Q8. Explain Local Storage, Session Storage, cache in Web development

Ans.

Local Storage, Session Storage, and Cache are used to store data in the browser for faster access and better user experience.

  • Local Storage: stores data with no expiration date and can be accessed across multiple windows and tabs

  • Session Storage: stores data for a single session and is cleared when the session ends

  • Cache: stores data temporarily to reduce server load and improve performance

  • Examples: storing user preferences, caching images and scripts for faster page load

Add your answer

Q9. WeakMap and WeakSet in Javascript?

Ans.

WeakMap and WeakSet are specialized collections in JavaScript that allow for weak references to objects.

  • WeakMap allows for mapping of objects to values where the object keys are weakly referenced.

  • WeakSet is a collection of objects where the objects are weakly referenced.

  • Weak references allow for objects to be garbage collected if they are no longer referenced elsewhere.

  • WeakMap and WeakSet are useful for scenarios where you want to associate data with an object without prevent...read more

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 Interview Questions from Similar Companies

3.9
 • 396 Interview Questions
3.5
 • 373 Interview Questions
4.0
 • 264 Interview Questions
4.0
 • 202 Interview Questions
4.1
 • 139 Interview Questions
View all
Top DigiBoxx Interview Questions And Answers
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