Filter interviews by
useSelector and useDispatch hooks are used in React Redux for accessing state and dispatching actions respectively.
useSelector hook is used to extract data from the Redux store state in a functional component.
useDispatch hook is used to dispatch actions to the Redux store in a functional component.
Example: const data = useSelector(state => state.data); dispatch(action());
The code will output 'undefined' and then '10' in the console.
The variable 'a' is declared after the first console.log statement, so it will be undefined at that point.
The value of 'a' is assigned as 10 before the second console.log statement, so it will output 10.
I have used libraries like React, Redux, Axios, and Moment.js for frontend development.
React
Redux
Axios
Moment.js
Yes, Redux does not have built-in persistence for state.
Redux itself does not have built-in persistence for state
Persisting state in Redux typically involves using middleware like redux-persist or saving state to local storage
Examples of persisting state in Redux include using redux-persist to save state to local storage or using cookies to store state
useContext is used for accessing context values in functional components, while useReducer is used for managing state in a more complex way.
useContext is used for accessing context values without prop drilling
useReducer is used for managing state in a more complex way by using a reducer function
useContext is simpler and more straightforward, while useReducer provides more control and flexibility
Example: useContext...
Redux is a predictable state container for JavaScript apps.
Single source of truth: The state of your whole application is stored in an object tree within a single store.
State is read-only: The only way to change the state is to emit an action, an object describing what happened.
Changes are made with pure functions: To specify how the state tree is transformed by actions, you write pure reducers.
State changes are m...
useContext is a React hook for managing global state within a component tree, while Redux is a standalone state management library for React applications.
useContext is built into React and is used for managing local state within a component or passing data down through the component tree.
Redux is a separate library that allows for managing global state across the entire application, with actions and reducers to up...
States in React are passed down from parent components to child components using props.
States are passed down as props from parent components to child components
Parent components can pass states to child components using props
States can be updated in parent components and passed down to child components for re-rendering
Using useContext to implement increment and decrement feature in React
Create a context using createContext()
Define a provider component to wrap the components that need access to the context
Use useContext() hook in the components to access the context and update the state
Implement functions for increment and decrement within the context provider
The output will be false because arrays are reference types and the comparison is based on reference, not values.
Arrays are reference types in JavaScript, so when comparing two arrays using ===, it checks if they refer to the same object in memory.
Since the two empty arrays [] are separate instances in memory, the comparison will result in false.
I applied via Approached by Company and was interviewed in Nov 2024. There were 2 interview rounds.
I am a passionate frontend developer with experience in HTML, CSS, and JavaScript.
Experienced in building responsive websites using HTML and CSS
Proficient in JavaScript for interactive web applications
Familiar with frontend frameworks like React and Angular
I have implemented various features in React such as state management, routing, API integration, and component lifecycle methods.
State management using useState and useReducer hooks
Routing with React Router
API integration with fetch or axios
Component lifecycle methods like componentDidMount and componentDidUpdate
I have used React versions 16 and 17 in my projects.
Used React 16 for a project that required class components and lifecycle methods
Currently using React 17 for a project that focuses on functional components and hooks
I have used libraries like React, Redux, Axios, and Moment.js for frontend development.
React
Redux
Axios
Moment.js
Yes, Redux does not have built-in persistence for state.
Redux itself does not have built-in persistence for state
Persisting state in Redux typically involves using middleware like redux-persist or saving state to local storage
Examples of persisting state in Redux include using redux-persist to save state to local storage or using cookies to store state
The output will be false because arrays are reference types and the comparison is based on reference, not values.
Arrays are reference types in JavaScript, so when comparing two arrays using ===, it checks if they refer to the same object in memory.
Since the two empty arrays [] are separate instances in memory, the comparison will result in false.
The code will output 'undefined' and then '10' in the console.
The variable 'a' is declared after the first console.log statement, so it will be undefined at that point.
The value of 'a' is assigned as 10 before the second console.log statement, so it will output 10.
This function counts down from a given time in seconds to zero, logging each second to the console.
Use a loop to iterate from the given time down to 0.
Utilize setInterval to create a delay between each console.log.
Ensure to clear the interval once the countdown reaches zero.
Example: For an input of 5, the output will be 5, 4, 3, 2, 1, 0.
States in React are passed down from parent components to child components using props.
States are passed down as props from parent components to child components
Parent components can pass states to child components using props
States can be updated in parent components and passed down to child components for re-rendering
useContext is a React hook for managing global state within a component tree, while Redux is a standalone state management library for React applications.
useContext is built into React and is used for managing local state within a component or passing data down through the component tree.
Redux is a separate library that allows for managing global state across the entire application, with actions and reducers to update ...
useSelector and useDispatch hooks are used in React Redux for accessing state and dispatching actions respectively.
useSelector hook is used to extract data from the Redux store state in a functional component.
useDispatch hook is used to dispatch actions to the Redux store in a functional component.
Example: const data = useSelector(state => state.data); dispatch(action());
Using useContext to implement increment and decrement feature in React
Create a context using createContext()
Define a provider component to wrap the components that need access to the context
Use useContext() hook in the components to access the context and update the state
Implement functions for increment and decrement within the context provider
We are currently using React version 17.0.2.
React version 17.0.2 is the latest stable version at the time of this interview.
It was released on March 22, 2021, and includes improvements like React Hooks, Concurrent Mode, and more.
We regularly update our dependencies to stay up-to-date with the latest features and improvements.
Debouncing and throttling are techniques used in web development to limit the number of times a function is called.
Debouncing delays the execution of a function until after a specified time has elapsed without any further calls. It is typically used for events like scroll or resize that can fire multiple times in a short period.
Throttling limits the rate at which a function is called. It ensures that the function is no...
TypeScript is used to add static typing to JavaScript, catching errors at compile time and improving code quality.
Provides static typing, catching errors at compile time
Improves code quality and maintainability
Supports modern JavaScript features like ES6+
Enhances code editor tooling and IntelliSense
Facilitates easier refactoring and code navigation
Redux passes states to components through the connect function provided by react-redux library.
Redux passes states to components by connecting the component to the Redux store using the connect function.
The connect function takes mapStateToProps as an argument, which maps the state from the Redux store to props of the component.
The connected component can then access the state from the Redux store as props.
Browsers use various storage options like cookies, local storage, session storage, and IndexedDB.
Cookies are small pieces of data stored in the browser that can be accessed by both the server and the client.
Local storage allows storing data without expiration date, and it remains even after the browser is closed.
Session storage is similar to local storage but data is cleared when the session ends.
IndexedDB is a low-lev...
Redux is a predictable state container for JavaScript apps.
Single source of truth: The state of your whole application is stored in an object tree within a single store.
State is read-only: The only way to change the state is to emit an action, an object describing what happened.
Changes are made with pure functions: To specify how the state tree is transformed by actions, you write pure reducers.
State changes are made w...
Yes, multiple stores can be created in Redux for managing different parts of the application state.
Redux allows creating multiple stores, each with its own reducers and actions
This can be useful for managing different parts of the application state separately
Example: creating one store for user authentication and another for managing shopping cart
Redux uses the browser's localStorage as its default storage mechanism.
Redux uses the browser's localStorage API to persist state across sessions.
The data stored in localStorage is serialized to a string before being saved.
Developers can also implement custom storage solutions by creating middleware in Redux.
Flux is a state management pattern for building user interfaces, often used with React to manage data flow.
Flux promotes unidirectional data flow, making it easier to understand how data changes in an application.
It consists of four main components: Actions, Dispatcher, Stores, and Views.
Actions are payloads of information that send data from the application to the dispatcher.
The Dispatcher is a central hub that manage...
The CSS DOM (Document Object Model) is a representation of the structure of a webpage created by CSS styles.
CSS DOM is a tree-like structure that represents the HTML elements of a webpage along with their CSS styles.
It allows developers to access and manipulate the styles of HTML elements using CSS properties and selectors.
Changes made to the CSS DOM dynamically update the visual appearance of the webpage.
Example: Sele...
Browsers use various storage options for state management, including cookies, local storage, session storage, and IndexedDB.
Cookies: small pieces of data stored in the browser that can be accessed by both the server and client
Local Storage: stores data with no expiration date, and remains after the browser is closed
Session Storage: stores data for one session only, and is cleared when the browser is closed
IndexedDB: a ...
useContext is used for accessing context values in functional components, while useReducer is used for managing state in a more complex way.
useContext is used for accessing context values without prop drilling
useReducer is used for managing state in a more complex way by using a reducer function
useContext is simpler and more straightforward, while useReducer provides more control and flexibility
Example: useContext can ...
Specificity in CSS determines which style rule is applied to an element when multiple rules have conflicting selectors.
Specificity is calculated based on the type of selector used in a CSS rule.
Inline styles have the highest specificity, followed by IDs, classes, and elements.
Specificity is represented by a four-part value, with each part corresponding to a different type of selector.
For example, the selector 'div p' h...
Virtualization is the process of creating a virtual version of a device or resource, such as a server, storage device, network or operating system.
Virtualization allows multiple virtual instances to run on a single physical machine, maximizing resource utilization.
Examples of virtualization technologies include VMware, VirtualBox, and Docker.
Virtualization can improve scalability, flexibility, and efficiency in IT envi...
The critical rendering path is the sequence of steps browsers take to convert HTML, CSS, and JavaScript into pixels on the screen.
Includes steps like parsing HTML, constructing the DOM tree, rendering the CSSOM, combining them into a render tree, layout, and painting.
Optimizing the critical rendering path involves minimizing render-blocking resources, reducing the number of critical resources, and optimizing the order ...
Infinite scrolling is a design pattern that continuously loads content as the user scrolls down a webpage.
Infinite scrolling helps to provide a seamless user experience by eliminating the need for pagination.
It is commonly used in social media feeds, image galleries, and news websites.
Infinite scrolling can be implemented using JavaScript to fetch and append new content dynamically.
Top trending discussions
I applied via Campus Placement and was interviewed before May 2021. There were 4 interview rounds.
VERBAL QUANT DI/LR and Picture based test
Fibonacci series can be easily implemented using loops in C++ or C.
Declare variables for first two numbers of the series
Use a loop to calculate and print the next number in the series
Repeat the loop until desired number of terms are printed
I appeared for an interview before Sep 2020.
Round duration - 90 minutes
Round difficulty - Easy
This round was held during university hours and consisted of 2 coding questions.
Round duration - 120 minutes
Round difficulty - Easy
Make sure you do no cutting and are clear about the approach you'd be following.
Running median of an input stream is the median value of the numbers seen so far in a continuous stream of data.
Maintain two heaps - a max heap for the lower half of the numbers and a min heap for the upper half.
Keep the number of elements in the two heaps balanced or differ by at most 1.
If the total number of elements is odd, the median is the root of the max heap. If even, it is the average of the roots of the two he...
Prepare for company-wise interview questions according to the company in which you are applying. Try to write the code yourself and if got stuck in between then take help from the internet. I recommend you Codezen of Coding Ninjas for practicing Data Structures and Algorithms based questions.
Application resume tips for other job seekersBe sure 100% of what you write in your resume and prepare for that before the interview what is written on resume.
Final outcome of the interviewSelectedI applied via Referral and was interviewed before Jan 2021. There was 1 interview round.
Abstract class is a class that cannot be instantiated, List is a collection of objects, SQL is a language used to manage databases, ADO.net is a framework for accessing databases.
Abstract class is used as a base class for other classes
List is a generic collection of objects
SQL is used to create, modify, and query databases
ADO.net provides a set of classes for accessing databases
Example: abstract class Animal { public a...
I applied via Company Website and was interviewed before Jan 2021. There were 5 interview rounds.
I applied via Naukri.com and was interviewed in Jul 2020. There were 3 interview rounds.
I'm a passionate software developer with 5 years of experience in building scalable web applications and a strong focus on user experience.
Experience in full-stack development using technologies like React, Node.js, and MongoDB.
Led a team project that improved application performance by 30% through code optimization.
Strong background in Agile methodologies, having participated in multiple sprints and retrospectives.
Dev...
I excel in problem-solving, collaboration, and adaptability, which enhance my effectiveness as a software developer.
Strong problem-solving skills: I enjoy tackling complex coding challenges, like optimizing algorithms for better performance.
Effective collaboration: I have successfully worked in Agile teams, contributing to projects like a web application that improved user engagement.
Adaptability: I quickly learn new t...
I tend to be overly critical of my work, which can slow down my progress and affect my confidence in delivering projects.
I often spend too much time refining code, which can delay project timelines. For example, I once spent an extra week on a feature.
I sometimes struggle with delegation, preferring to handle tasks myself to ensure quality. This was evident in a group project where I took on too much.
I can be hesitant ...
I am looking for a competitive salary that reflects my skills and experience in software development.
Based on my research, the average salary for a software developer in this region is between $80,000 and $100,000.
I have over 5 years of experience in full-stack development, which I believe warrants a salary towards the higher end of that range.
I am open to discussing the entire compensation package, including benefits ...
I applied via Referral and was interviewed before Jun 2021. There were 2 interview rounds.
Java, program logic, software engineering
I applied via Recruitment Consulltant and was interviewed before Aug 2021. There were 2 interview rounds.
I applied via Company Website and was interviewed in May 2021. There were 3 interview rounds.
Some of the top questions asked at the Gyaan AI Junior Frontend Developer interview -
based on 1 interview experience
Difficulty level
Duration
Technical Recruiter
3
salaries
| ₹6 L/yr - ₹6.2 L/yr |
QA Lead
3
salaries
| ₹24 L/yr - ₹32 L/yr |
Product Designer
3
salaries
| ₹18.5 L/yr - ₹23.5 L/yr |
TCS
Accenture
Wipro
Cognizant