Metafic
Strobes Interview Questions and Answers
Q1. Write code for functional component to call an API and show a list from the response (given by the interviewer)
Code for functional component to call API and show list from response
Use useEffect hook to call API on component mount
Use useState hook to store API response
Map through response data to display list
Handle loading and error states
Q2. How would be dealing with an issue which was caused due to others?
I would approach the issue by identifying the root cause and collaborating with the team to find a solution.
Identify the root cause of the issue
Collaborate with the team to find a solution
Communicate effectively with all parties involved
Take ownership of the issue and work towards a resolution
Document the issue and the steps taken to resolve it
Q3. Explain UseMemo, UseCallback, UseEffect uses, and lifecycle method in the class component.
Explanation of React hooks and lifecycle methods
useMemo is used to memoize expensive computations and avoid unnecessary re-renders
useCallback is used to memoize functions and avoid unnecessary re-renders of child components
useEffect is used to perform side effects such as fetching data or updating the DOM
Lifecycle methods in class components are used to manage component state and perform side effects
ComponentDidMount is called after the component is mounted and is used to fet...read more
Q4. What is virtual DOM in react?
Virtual DOM is a lightweight copy of the actual DOM used for efficient rendering in React.
Virtual DOM is a JavaScript object that represents the actual DOM.
It allows React to update only the necessary parts of the UI, improving performance.
Changes made to the virtual DOM are compared with the previous version to determine what needs to be updated.
React then updates the actual DOM with the minimum required changes.
Virtual DOM is created using React.createElement() or JSX.
React...read more
Q5. Write down the code from that API to integrate pagination on scrolling
Code for integrating pagination on scrolling in Reactjs API
Use Intersection Observer API to detect when the user has scrolled to the bottom of the page
Fetch the next set of data from the server using an API call
Update the state with the new data and render it on the page
Q6. What are Heuristics
Heuristics are general rules or guidelines used to solve problems or make decisions more efficiently.
Heuristics are mental shortcuts that help simplify complex problems.
They are often based on past experiences and knowledge.
Heuristics can lead to biases and errors in decision-making.
Examples include 'availability heuristic' and 'representativeness heuristic'.
Interview Process at Strobes
Top Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month