Filter interviews by
Top trending discussions
I applied via Referral and was interviewed in Aug 2024. There was 1 interview round.
Useeffect is a hook in React that allows performing side effects in function components.
Useeffect is used to perform side effects in function components.
It runs after every render by default.
It can be used to fetch data, subscribe to events, or update the DOM.
It can also clean up effects by returning a function.
Dependencies can be specified to control when the effect runs.
useState is a hook in React that allows functional components to have state.
useState is a built-in hook in React.
It allows functional components to have stateful logic.
useState returns an array with two elements - the current state value and a function to update that value.
Example: const [count, setCount] = useState(0);
SDLC lifecycle stands for Software Development Life Cycle, which is a process used by software development teams to design, develop, and test high-quality software.
SDLC lifecycle consists of several phases including planning, analysis, design, implementation, testing, and maintenance.
Each phase has its own set of activities and deliverables to ensure the successful completion of the software project.
Examples of SDLC mo...
Normal js,react question
Hoisting is the JavaScript mechanism where variable and function declarations are moved to the top of their containing scope. HOC stands for Higher Order Component, a pattern used in React for code reusability. Debouncing is a technique used to limit the rate at which a function is executed.
Hoisting moves variable and function declarations to the top of their scope during the compilation phase.
HOC is a function that ta...
Closure is the combination of a function bundled together with references to its surrounding state.
Closure allows a function to access variables from its outer scope even after the outer function has finished executing.
It is created whenever a function is defined within another function.
Closure is commonly used in event handlers, callbacks, and maintaining state in functional programming.
I applied via Campus Placement and was interviewed in Jan 2023. There were 5 interview rounds.
It was Aptitude plus coding round, it was online on a secured platform.
I applied via Naukri.com and was interviewed in Mar 2021. There was 1 interview round.
Error handling in React can be done using try-catch blocks, error boundaries, and handling asynchronous errors.
Use try-catch blocks to handle synchronous errors
Use error boundaries to catch errors in child components
Handle asynchronous errors using promises or async/await
Use third-party libraries like Sentry or Bugsnag for better error tracking
Display user-friendly error messages to improve user experience
Refs are a way to access DOM nodes or React components directly. They can be used to get input values.
Refs provide a way to access DOM nodes or React components directly.
They are commonly used to get input values or trigger imperative animations.
Refs can be created using the `createRef()` method or by using a callback function.
To get the value of an input using refs, you can assign a ref to the input element and access
useState and useEffect are React Hooks used for managing state and side effects respectively.
useState is used to manage state in functional components
It returns an array with two elements - the current state value and a function to update the state
useEffect is used to manage side effects like fetching data or updating the DOM
It takes a function as its argument and runs it after every render
useEffect can also take a sec...
Lazy Loading and Suspense are techniques used to improve performance by loading components and data only when needed.
Lazy Loading delays the loading of non-critical resources until they are needed, reducing initial load time.
Suspense allows components to wait for data to load before rendering, improving user experience.
Lazy Loading and Suspense can be used together to optimize performance and user experience.
Example: A...
componentWillUnmount is a lifecycle method in React that is called right before a component is unmounted and destroyed.
componentWillUnmount is used to perform any necessary cleanup tasks before a component is removed from the DOM.
It is commonly used to cancel any pending network requests, remove event listeners, or clear timers or intervals.
The method is called automatically by React when a component is about to be unm...
To avoid re-rendering, use shouldComponentUpdate or React.memo
Use shouldComponentUpdate to compare current and next props/state
Use React.memo to memoize functional components
Use useMemo to memoize expensive computations
Use useCallback to memoize event handlers
Use PureComponent for class components
Semantic tags in HTML are elements that provide meaning to the content they enclose, helping search engines and screen readers understand the structure of a webpage.
Semantic tags are used to define the structure of a webpage, making it easier for search engines to index the content.
Examples of semantic tags include
Using semantic tags also improves accessibility for users with disa...
Responsive design is creating web applications that adapt to different screen sizes and devices.
Use media queries in CSS to adjust styles based on screen size
Utilize flexible grids and layouts to ensure content adjusts accordingly
Test the design on various devices and screen sizes to ensure responsiveness
I applied via Naukri.com and was interviewed in Sep 2023. There were 3 interview rounds.
MCQ questions on react
Hoisting is a behavior in JavaScript where variable and function declarations are moved to the top of their containing scope during compilation.
Variable declarations are hoisted to the top of their scope but not their assignments.
Function declarations are fully hoisted, meaning they can be called before they are declared.
Hoisting can lead to unexpected behavior if not understood properly.
I was interviewed in Feb 2023.
Software Engineer
34
salaries
| ₹2.5 L/yr - ₹5 L/yr |
QA Engineer
8
salaries
| ₹3 L/yr - ₹4.5 L/yr |
Software Developer
4
salaries
| ₹2.9 L/yr - ₹3.6 L/yr |
KPMG India
Deloitte
PwC
Ernst & Young