i
Intelizign Lifecycle Services
Filter interviews by
State is mutable data managed within a component, while props are immutable data passed from parent to child components.
State is managed within a component and can be updated using setState() method
Props are passed from parent to child components and cannot be changed within the child component
State is used for managing component-specific data, while props are used for passing data between components
State is mutable data managed by a component, while props are read-only data passed from parent to child components.
State is managed within a component and can be updated using setState() method
Props are passed from parent to child components and cannot be modified by the child component
State is used for managing component-specific data, while props are used for passing data between components
Life cycle methods in React.js are special methods that are automatically called at specific points in a component's life cycle.
Life cycle methods include componentDidMount, componentDidUpdate, componentWillUnmount, etc.
componentDidMount is called after the component has been rendered to the DOM.
componentDidUpdate is called after the component's state or props have been updated.
componentWillUnmount is called before the
Redux flow in ReactJS is the process of managing application state using a centralized store.
Actions are dispatched by components to update the state
Reducers specify how the state should change in response to actions
The updated state is then passed down to components via props
useEffect hook in Reactjs is used to perform side effects in function components.
Used to perform side effects in function components
Similar to componentDidMount and componentDidUpdate in class components
Takes a function as its first argument and an optional array of dependencies as its second argument
Dependencies array controls when the effect is re-run
I applied via Approached by Company and was interviewed in Oct 2024. There was 1 interview round.
MCQ test and coding questions
Coding test related to Reactjs topic
Top trending discussions
I applied via Naukri.com and was interviewed in Nov 2024. There was 1 interview round.
get props is used to retrieve the value of a property in React components, while set props is used to update the value of a property.
get props is used to access the value of a property passed down from a parent component
set props is used to update the value of a property in the current component
Example: get props - accessing the 'name' prop in a child component: this.props.name
Example: set props - updating the 'count' ...
get forEach is used to iterate over elements in an array without returning a new array, while map creates a new array by applying a function to each element.
forEach does not return a new array, while map returns a new array with the results of applying a function to each element
forEach is used for side effects, while map is used for transforming data
forEach does not return anything, while map returns a new array
Example...
PUT is used to update or replace an entire resource, while PATCH is used to update or modify part of a resource.
PUT is idempotent, meaning multiple identical requests will have the same effect as a single request.
PATCH is not necessarily idempotent, as multiple identical requests may have different effects.
PUT requires the client to send the entire updated resource, while PATCH only requires the client to send the spec...
Local storage is persistent and stays until manually cleared, while session storage is temporary and cleared when the browser is closed.
Local storage data persists even after closing the browser
Session storage data is cleared when the browser is closed
Both store data as key-value pairs similar to cookies
I was interviewed in Feb 2024.
I applied via Company Website and was interviewed in Nov 2023. There were 2 interview rounds.
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 state.
It returns an array with two elements: the current state value and a function to update the state.
The initial state can be passed as an argument to useState.
The state can be of any data type, such as a string, number, boolean, or object.
Example: const [count, set
Closure is a feature in JavaScript that allows a function to access variables from its outer scope even after the function has finished executing.
Closure is created when a function is defined inside another function.
The inner function has access to the variables and parameters of the outer function.
The inner function forms a closure with the outer function, preserving the state of the outer function's variables.
Closure...
Props are read-only properties that are passed from a parent component to a child component in React.
Props allow data to be passed between components in a unidirectional flow.
Props are immutable and cannot be modified by the child component.
Props can be used to customize the behavior or appearance of a component.
Props are accessed using the 'this.props' syntax in class components or as function arguments in functional
posted on 6 Mar 2023
I applied via Naukri.com and was interviewed in Feb 2023. There were 3 interview rounds.
It was an online test. The test was having 25 English questions and 25 coding MCQ questions. Test duration was 60 Mins
posted on 28 Jul 2022
Remove duplicate elements from an array of strings
Create a new Set from the array to remove duplicates
Convert the Set back to an array using the spread operator
Alternatively, use filter() and indexOf() to remove duplicates
Hooks are a new feature in React 16.8 that allow you to use state and other React features without writing a class.
Hooks are functions that let you use state and other React features in functional components.
They allow you to reuse stateful logic without changing your component hierarchy.
Some built-in hooks include useState, useEffect, useContext, etc.
Hooks provide a more direct API to the React concepts you already kn...
Pure component is a class component that does not re-render if the input props and state remain the same.
Pure components implement shouldComponentUpdate method with shallow prop and state comparison.
They are optimized for performance as they prevent unnecessary re-renders.
Example: class MyComponent extends React.PureComponent { // component code here }
Modules in JavaScript are reusable pieces of code that can be exported from one file and imported into another.
Modules help in organizing code into separate files for better maintainability.
Modules can be imported using 'import' keyword and exported using 'export' keyword.
Modules can be used to encapsulate code and prevent global namespace pollution.
CommonJS and ES6 modules are two popular module systems in JavaScript.
rem and em are both units in CSS for defining font sizes, with rem being relative to the root element and em being relative to the parent element.
rem stands for 'root em' and is relative to the font size of the root element (usually the tag)
em stands for 'element em' and is relative to the font size of the parent element
To hide something in CSS, you can use the display property with a value of 'none' or the visibility...
React functional components have access to various hooks like useState, useEffect, useContext, etc. Closure is a feature in JavaScript where a function has access to its outer function's scope.
React hooks available in functional components include useState, useEffect, useContext, useReducer, useCallback, useMemo, useRef, useImperativeHandle, useLayoutEffect, and useDebugValue.
useState is used to manage state in functio...
Interview experience
Software Engineer
331
salaries
| ₹2 L/yr - ₹10 L/yr |
Senior Software Engineer
256
salaries
| ₹5.1 L/yr - ₹17.1 L/yr |
Design Engineer
195
salaries
| ₹1.8 L/yr - ₹8 L/yr |
Software Developer
75
salaries
| ₹2.5 L/yr - ₹11 L/yr |
Senior Design Engineer
56
salaries
| ₹3.8 L/yr - ₹9.1 L/yr |
TCS
Wipro
HCLTech
Tech Mahindra