Filter interviews by
Top trending discussions
I applied via Company Website and was interviewed in Oct 2024. There were 3 interview rounds.
ES6 is the latest version of ECMAScript with new features like arrow functions, classes, and template literals.
Arrow functions provide a more concise syntax for writing functions.
Classes allow for easier object-oriented programming in JavaScript.
Template literals make it easier to work with strings by allowing interpolation and multiline strings.
Creating react componont with api integration, list rendering and adding custom filterals
Coding exercise, custom hooks, UI related quetions
I applied via Referral and was interviewed in Nov 2024. There was 1 interview round.
posted on 10 Jul 2023
useState is for managing state within a component, useContext is for sharing state between components, and redux is for managing global state across the application.
useState is a React hook used to manage state within a functional component
useContext is a React hook used to share state between components without prop drilling
Redux is a state management library that allows for managing global state across the applicatio...
The difference between == and === in JavaScript
== is the equality operator in JavaScript, which performs type coercion before comparing two values
=== is the strict equality operator, which does not perform type coercion and compares both value and type
Using === is generally considered safer and more predictable than using ==
Example: 1 == '1' will return true, but 1 === '1' will return false
I applied via Referral and was interviewed in Jun 2022. There were 2 interview rounds.
.name{
margin-left : 50%;
margin-top : -59%;
background : -webkit-linear-gradiend(-85deg,rgb(255,0,0),rgb(255,251,0));
-webkit-background-clip : text;
-webkit-text-fill-color : transparent;
}
I applied via Naukri.com and was interviewed in Mar 2021. There was 1 interview round.
To connect a component to Redux store, we use the connect function from the react-redux library.
Import the connect function from react-redux.
Use the connect function to wrap the component and connect it to the Redux store.
The connect function takes two parameters: mapStateToProps and mapDispatchToProps.
mapStateToProps is a function that maps the state from the Redux store to the component's props.
mapDispatchToProps is ...
Context API is a way to share data between components without passing props down manually.
Context API provides a way to pass data through the component tree without having to pass props down manually at every level.
It is useful for sharing data that needs to be accessed by many components at different levels of the tree.
Initial state can be set in Context API using the createContext() function.
There is no need to have ...
Yes, it is mandatory for Reducer to have an initial state.
Initial state defines the starting point of the state tree.
It helps in defining the shape of the state tree.
It is used to set default values for the state properties.
It is also used to reset the state to its initial values.
Example: const initialState = { count: 0 };
Example: const initialState = { name: '', age: 0 };
Minimum coverage for an app and code pushed to production/master branch while deployment.
Minimum coverage for an app depends on the project requirements and complexity.
Generally, a coverage of 80% or higher is considered good.
Code pushed to production/master branch should be thoroughly tested and reviewed.
Continuous integration and deployment can help automate this process.
Examples of tools for code coverage include Je
React re-renders just the part of the page that has changed, thanks to its virtual DOM.
React uses a virtual DOM to track changes in the UI.
When a component's state or props change, React compares the virtual DOM with the real DOM and updates only the necessary parts.
This approach improves performance by minimizing the number of DOM manipulations.
React's diffing algorithm efficiently determines the minimal set of change
Service Workers are scripts that run in the background and can intercept network requests, cache or modify responses.
Offline support for web applications
Push notifications
Background synchronization
Reduced network usage and faster page loads
Progressive Web Apps (PWA)
Redux-Saga is a middleware for Redux that handles side effects. Actions can be dispatched from components using mapDispatchToProps.
Redux-Saga is used to handle side effects like API calls and asynchronous actions.
It uses generator functions to make asynchronous code look synchronous.
Sagas listen for specific actions and perform tasks based on those actions.
To dispatch actions from components, use mapDispatchToProps to ...
Hoisting is a JavaScript mechanism where variable and function declarations are moved to the top of their containing scope during compilation.
Variable declarations are hoisted but not their initializations.
Function declarations are fully hoisted, meaning they can be called before they are declared.
Hoisting can lead to unexpected behavior if not understood properly.
CSS positions include static, relative, absolute, fixed, and sticky.
Static - default position, elements are positioned according to the normal flow of the document
Relative - positioned relative to its normal position
Absolute - positioned relative to the nearest positioned ancestor
Fixed - positioned relative to the viewport
Sticky - acts like a combination of relative and fixed positioning
Semantic tags are HTML tags that clearly define the content they contain for better accessibility and SEO.
Semantic tags provide meaning to the content they enclose, making it easier for search engines to understand the structure of the page.
Examples of semantic tags include
Using semantic tags improves the accessibility of the website for users with disabilities, as screen readers can interp
Promise chaining is a technique in JavaScript where multiple asynchronous operations are chained together to execute sequentially.
Allows for handling multiple asynchronous operations in a more readable and organized way
Each promise in the chain returns a new promise, allowing for further chaining
Helps avoid callback hell by nesting promises inside each other
Example: promise1.then(result => { return promise2; }).then(re
Virtual DOM is a lightweight copy of the actual DOM that React uses to improve performance by minimizing direct manipulation of the actual DOM.
Virtual DOM is a concept in React where a lightweight copy of the actual DOM is created and updated in memory.
When changes are made to the virtual DOM, React compares it with the actual DOM and only updates the necessary parts, reducing the number of direct manipulations to the ...
Synthetic events in React are events that are normalized by React to ensure consistent behavior across different browsers.
Synthetic events are instances of the SyntheticEvent object in React.
They are cross-browser compatible and have the same interface as native events.
They are used to handle events like onClick, onChange, etc. in React components.
Example:
Redux is a predictable state container for JavaScript apps.
Redux is a state management tool commonly used with React to manage the application's state in a predictable way.
It helps in maintaining a single source of truth for the state of the entire application.
Redux follows a unidirectional data flow, making it easier to understand how data changes over time.
Actions are dispatched to update the state in Redux, and redu...
Hooks in React are functions that let you use state and other React features without writing a class.
Hooks were introduced in React 16.8.
They allow you to use state and other React features in functional components.
Some commonly used hooks are useState, useEffect, useContext, and useReducer.
useMemo is used for memoizing values, while useCallback is used for memoizing functions.
useMemo is used to memoize a value and only recompute it when its dependencies change.
useCallback is used to memoize a function instance and only re-create it when its dependencies change.
Example: useMemo can be used to memoize the result of a complex computation, while useCallback can be used to memoize a callback function passed t
posted on 10 Jul 2023
useState is for managing state within a component, useContext is for sharing state between components, and redux is for managing global state across the application.
useState is a React hook used to manage state within a functional component
useContext is a React hook used to share state between components without prop drilling
Redux is a state management library that allows for managing global state across the applicatio...
The difference between == and === in JavaScript
== is the equality operator in JavaScript, which performs type coercion before comparing two values
=== is the strict equality operator, which does not perform type coercion and compares both value and type
Using === is generally considered safer and more predictable than using ==
Example: 1 == '1' will return true, but 1 === '1' will return false
Interview experience
Senior PHP Developer
3
salaries
| ₹2.4 L/yr - ₹2.4 L/yr |
Full Stack Developer
3
salaries
| ₹2.4 L/yr - ₹10.2 L/yr |
Infosys
TCS
Wipro
HCLTech