i
Promilo
Filter interviews by
Top trending discussions
I applied via Recruitment Consulltant and was interviewed in Oct 2022. There were 3 interview rounds.
Create a timer component in React for tracking time.
Use state to store the current time
Use setInterval to update the time every second
Display the time in a user-friendly format
Fetch API calls are executed in the browser's JavaScript environment.
Fetch API calls are executed asynchronously in the browser's event loop.
They are typically triggered by JavaScript code in response to user actions or other events.
The fetch API call is made from the client-side JavaScript code and sent to the server to retrieve data.
Once the data is received, the fetch API call processes the response and updates the
I applied via Recruitment Consulltant and was interviewed in Mar 2022. There was 1 interview round.
Hoisting is a JavaScript behavior where variable and function declarations are moved to the top of their containing scope.
Hoisting applies to both variable and function declarations.
Variable declarations are hoisted but not their initializations.
Function declarations are fully hoisted, allowing them to be called before they are declared.
Hoisting does not apply to variables declared with let or const.
Hoisting can lead t...
Higher-order functions are functions that take one or more functions as arguments or return a function as their result.
Higher-order functions can be used to create reusable code by abstracting common patterns.
They enable functional programming paradigms like currying and composition.
Examples of higher-order functions in JavaScript include map, filter, and reduce.
var is function scoped, let and const are block scoped.
var can be redeclared and updated within its scope
let can be updated but not redeclared within its scope
const cannot be updated or redeclared once declared
let and const are not hoisted like var
const must be initialized during declaration
Hooks are a feature in React.js that allow developers to use state and other React features in functional components.
Hooks are functions that let you use React features in functional components
They allow you to use state and other React features without writing a class
Hooks provide a way to reuse stateful logic between components
Some commonly used hooks are useState, useEffect, and useContext
I applied via Company Website and was interviewed in Nov 2022. There were 2 interview rounds.
Var is function scoped, let is block scoped. Redux is a predictable state container, Flux is an architecture pattern.
Var can be redeclared and updated within its scope, let cannot be redeclared but can be updated within its scope
Redux has a single store for the entire application, while Flux has multiple stores
Redux uses a unidirectional data flow, while Flux uses a bidirectional data flow
Redux has middleware for handl...
I applied via Company Website and was interviewed in Aug 2023. There was 1 interview round.
Conditional rendering in React allows components to render different elements or components based on certain conditions.
Conditional rendering is achieved using JavaScript expressions inside JSX.
Common conditional rendering techniques include using if statements, ternary operators, and logical && operator.
Example: rendering a component only if a certain condition is met - {condition ?
I applied via Recruitment Consulltant and was interviewed in Oct 2024. There were 2 interview rounds.
DOM tree is a hierarchical representation of HTML elements in a web page.
DOM stands for Document Object Model.
It is a tree-like structure where each node represents an HTML element.
The DOM tree is created by the browser when a web page is loaded.
It allows JavaScript to manipulate the content, structure, and style of a web page.
Props are immutable and passed from parent component, while state is mutable and managed within the component.
Props are read-only and cannot be modified by the component receiving them.
State is mutable and can be changed by the component that owns it.
Props are passed from parent to child components, while state is managed within the component itself.
Example: Props can be used to pass data from a parent component to a c...
Redux is a predictable state container for JavaScript apps. It is used to manage application state in a centralized way.
Use Redux when you have complex state management needs in your application.
Redux is helpful for large applications with many components that need access to the same state.
Avoid using Redux for simple applications with minimal state management requirements.
Consider using React's built-in state manageme...
Remove elements from source array present in another array passed to a function
Loop through elements in source array and check if they exist in the other array
If an element is found in both arrays, remove it from the source array
DOM tree is a hierarchical representation of HTML elements in a web page.
DOM stands for Document Object Model
It is a tree-like structure where each node represents an HTML element
The root node is the element, followed by
and elementsNodes can have parent-child relationships, siblings, and descendants
JavaScript can manipulate the DOM to dynamically update the content and structure of a web page
React lifecycle methods are methods that are invoked at different stages of a component's life cycle.
Some lifecycle methods include componentDidMount, componentDidUpdate, componentWillUnmount, etc.
In functional components, we can achieve similar functionality using useEffect hook.
For example, useEffect with an empty dependency array can mimic componentDidMount, while useEffect with dependencies can mimic componentDidUp
Redux is a predictable state container for JavaScript apps.
Redux is a state management library commonly used with React.
It helps in managing the state of the application in a predictable way.
Redux follows a unidirectional data flow architecture.
Actions are dispatched to update the state, which is stored in a single immutable state tree.
Reducers are pure functions that specify how the state should change in response to
The 'any' type in TypeScript is used when the type of a variable is not known during development.
Use 'any' when working with dynamic data types or when the type cannot be determined at compile time.
Avoid using 'any' as much as possible to maintain type safety and improve code quality.
Consider using 'unknown' type instead of 'any' for better type checking and error prevention.
Checklist for improving performance of React application
Use React.memo or PureComponent for optimizing rendering
Avoid unnecessary re-renders by using shouldComponentUpdate or React.memo
Use code splitting to load only necessary components
Optimize state management with libraries like Redux or Context API
Minimize the use of inline styles and prefer CSS stylesheets for better performance
React 16 introduced new features like React Fiber, Error Boundaries, Portals, and improved server-side rendering.
React Fiber is a new reconciliation engine that improves performance and enables incremental rendering.
Error Boundaries allow developers to catch and handle errors in components.
Portals provide a way to render children into a different DOM subtree.
Improved server-side rendering with support for streaming and...
React hooks simplify state management and lifecycle methods in functional components.
Hooks allow functional components to have state and lifecycle methods
They reduce the need for class components and HOCs
Hooks make code more readable and easier to test
Examples of hooks include useState, useEffect, and useContext
HOC components are higher-order components in React that allow code reuse and logic sharing.
HOC components are functions that take a component and return a new component with additional functionality.
They are used to abstract common logic and behaviors into reusable components.
HOC components can be used for tasks like authentication, logging, and code reuse.
Example: a withAuth HOC component that adds authentication log
based on 1 interview
Interview experience
Front end Developer
7
salaries
| ₹0 L/yr - ₹0 L/yr |
Manager Enterprise Sales
4
salaries
| ₹0 L/yr - ₹0 L/yr |
Flipkart
Amazon
Paytm
Reliance Industries