3.8.9 • Published 2 months ago

reactjs-interview-questions v3.8.9

Weekly downloads
-
License
MIT
Repository
github
Last release
2 months ago

React Interview Questions & Answers

Click :star:if you like the project. Pull Request are highly appreciated. Follow me @SudheerJonna for technical updates.




Note: This repository is specific to ReactJS. Please check Javascript Interview questions for core javascript questions and DataStructures and Algorithms for DSA related questions or problems.

Table of Contents

No.Questions
Core React
1What is React?
2What is the history behind React evolution?
3What are the major features of React?
4What is JSX?
5What is the difference between Element and Component?
6How to create components in React?
7When to use a Class Component over a Function Component?
8What are Pure Components?
9What is state in React?
10What are props in React?
11What is the difference between state and props?
12What is the difference between HTML and React event handling?
13What are synthetic events in React?
14What are inline conditional expressions?
15What is "key" prop and what is the benefit of using it in arrays of elements?
16What is Virtual DOM?
17How Virtual DOM works?
18What is the difference between Shadow DOM and Virtual DOM?
19What is React Fiber?
20What is the main goal of React Fiber?
21What are controlled components?
22What are uncontrolled components?
23What is the difference between createElement and cloneElement?
24What is Lifting State Up in React?
25What are Higher-Order components?
26What is children prop?
27How to write comments in React?
28What is reconciliation?
29Does the lazy function support named exports?
30Why React uses className over class attribute?
31What are fragments?
32Why fragments are better than container divs?
33What are portals in React?
34What are stateless components?
35What are stateful components?
36How to apply validation on props in React?
37What are the advantages of React?
38What are the limitations of React?
39What are the recommended ways for static type checking?
40What is the use of react-dom package?
41What is ReactDOMServer?
42How to use InnerHtml in React?
43How to use styles in React?
44How events are different in React?
45What is the impact of indexes as keys?
46How do you conditionally render components?
47Why we need to be careful when spreading props on DOM elements??
48How do you memoize a component?
49How you implement Server-Side Rendering or SSR?
50How to enable production mode in React?
51Do Hooks replace render props and higher order components?
52What is a switching component?
53What are React Mixins?
54What are the Pointer Events supported in React?
55Why should component names start with capital letter?
56Are custom DOM attributes supported in React v16?
57How to loop inside JSX?
58How do you access props in attribute quotes?
59What is React PropType array with shape?
60How to conditionally apply class attributes?
61What is the difference between React and ReactDOM?
62Why ReactDOM is separated from React?
63How to use React label element?
64How to combine multiple inline style objects?
65How to re-render the view when the browser is resized?
66How to pretty print JSON with React?
67Why you can't update props in React?
68How to focus an input element on page load?
69How can we find the version of React at runtime in the browser?
70How to add Google Analytics for react-router?
71How do you apply vendor prefixes to inline styles in React?
72How to import and export components using react and ES6?
73What are the exceptions on React component naming?
74Is it possible to use async/await in plain React?
75What are the common folder structures for React?
76What are the popular packages for animation?
77What is the benefit of styles modules?
78What are the popular React-specific linters?
React Router
79What is React Router?
80How React Router is different from history library?
81What are the \ components of React Router v4?
82What is the purpose of push and replace methods of history?
83How do you programmatically navigate using React router v4?
84How to get query parameters in React Router v4
85Why you get "Router may have only one child element" warning?
86How to pass params to history.push method in React Router v4?
87How to implement default or NotFound page?
88How to get history on React Router v4?
89How to perform automatic redirect after login?
React Internationalization
90What is React Intl?
91What are the main features of React Intl?
92What are the two ways of formatting in React Intl?
93How to use FormattedMessage as placeholder using React Intl?
94How to access current locale with React Intl
95How to format date using React Intl?
React Testing
96What is Shallow Renderer in React testing?
97What is TestRenderer package in React?
98What is the purpose of ReactTestUtils package?
99What is Jest?
100What are the advantages of Jest over Jasmine?
101Give a simple example of Jest test case
React Redux
102What is Flux?
103What is Redux?
104What are the core principles of Redux?
105What are the downsides of Redux compared to Flux?
106What is the difference between mapStateToProps() and mapDispatchToProps()?
107Can I dispatch an action in reducer?
108How to access Redux store outside a component?
109What are the drawbacks of MVW pattern
110Are there any similarities between Redux and RxJS?
111How to reset state in Redux?
112What is the difference between React context and React Redux?
113Why are Redux state functions called reducers?
114How to make AJAX request in Redux?
115Should I keep all component's state in Redux store?
116What is the proper way to access Redux store?
117What is the difference between component and container in React Redux?
118What is the purpose of the constants in Redux?
119What are the different ways to write mapDispatchToProps()?
120What is the use of the ownProps parameter in mapStateToProps() and mapDispatchToProps()?
121How to structure Redux top level directories?
122What is redux-saga?
123What is the mental model of redux-saga?
124What are the differences between call and put in redux-saga
125What is Redux Thunk?
126What are the differences between redux-saga and redux-thunk
127What is Redux DevTools?
128What are the features of Redux DevTools?
129What are Redux selectors and Why to use them?
130What is Redux Form?
131What are the main features of Redux Form?
132How to add multiple middlewares to Redux?
133How to set initial state in Redux?
134How Relay is different from Redux?
135What is an action in Redux?
React Native
136What is the difference between React Native and React?
137How to test React Native apps?
138How to do logging in React Native?
139How to debug your React Native?
React supported libraries and Integration
140What is reselect and how it works?
141What is Flow?
142What is the difference between Flow and PropTypes?
143How to use font-awesome icons in React?
144What is React Dev Tools?
145Why is DevTools not loading in Chrome for local files?
146How to use Polymer in React?
147What are the advantages of React over Vue.js?
148What is the difference between React and Angular?
149Why React tab is not showing up in DevTools?
150What are styled components?
151Give an example of Styled Components?
152What is Relay?
Miscellaneous
153What are the main features of reselect library?
154Give an example of reselect usage?
155Can Redux only be used with React?
156Do you need to have a particular build tool to use Redux?
157How Redux Form initialValues get updated from state?
158How React PropTypes allow different type for one prop?
159Can I import an SVG file as react component?
160What is render hijacking in React?
161How to pass numbers to React component?
162Do I need to keep all my state into Redux? Should I ever use react internal state?
163What is the purpose of registerServiceWorker in React?
164What is React memo function?
165What is React lazy function?
166How to prevent unnecessary updates using setState?
167How do you render Array, Strings and Numbers in React 16 Version?
168What are hooks?
169What rules need to be followed for hooks?
170How to ensure hooks followed the rules in your project?
171What are the differences between Flux and Redux?
172What are the benefits of React Router V4?
173Can you describe about componentDidCatch lifecycle method signature?
174In which scenarios error boundaries do not catch errors?
175What is the behavior of uncaught errors in react 16?
176What is the proper placement for error boundaries?
177What is the benefit of component stack trace from error boundary?
178What are default props?
179What is the purpose of displayName class property?
180What is the browser support for react applications?
181What is code-splitting?
182What are Keyed Fragments?
183Does React support all HTML attributes?
184When component props defaults to true?
185What is NextJS and major features of it?
186How do you pass an event handler to a component?
187How to prevent a function from being called multiple times?
188How JSX prevents Injection Attacks?
189How do you update rendered elements?
190How do you say that props are read only?
191What are the conditions to safely use the index as a key?
192Is it keys should be globally unique?
193What is the popular choice for form handling?
194What are the advantages of formik over redux form library?
195Why do you not required to use inheritance?
196Can I use web components in react application?
197What is dynamic import?
198What are loadable components?
199What is suspense component?
200What is route based code splitting?
201What is the purpose of default value in context?
202What is diffing algorithm?
203What are the rules covered by diffing algorithm?
204When do you need to use refs?
205Is it prop must be named as render for render props?
206What are the problems of using render props with pure components?
207What is windowing technique?
208How do you print falsy values in JSX?
209What is the typical use case of portals?
210How do you set default value for uncontrolled component?
211What is your favorite React stack?
212What is the difference between Real DOM and Virtual DOM?
213How to add Bootstrap to a react application?
214Can you list down top websites or applications using react as front end framework?
215Is it recommended to use CSS In JS technique in React?
216Do I need to rewrite all my class components with hooks?
217How to fetch data with React Hooks?
218Is Hooks cover all use cases for classes?
219What is the stable release for hooks support?
220Why do we use array destructuring (square brackets notation) in useState?
221What are the sources used for introducing hooks?
222How do you access imperative API of web components?
223What is formik?
224What are typical middleware choices for handling asynchronous calls in Redux?
225Do browsers understand JSX code?
226Describe about data flow in react?
227What is MobX?
228What are the differences between Redux and MobX?
229Should I learn ES6 before learning ReactJS?
230What is Concurrent Rendering?
231What is the difference between async mode and concurrent mode?
232Can I use javascript urls in react16.9?
233What is the purpose of eslint plugin for hooks?
234What is the difference between Imperative and Declarative in React?
235What are the benefits of using typescript with reactjs?
236How do you make sure that user remains authenticated on page refresh while using Context API State Management?
237What are the benefits of new JSX transform?
238How is the new JSX transform different from old transform?
239What are React Server components?
240What is prop drilling?
241What is the difference between useState and useRef hook?
242What is a wrapper component
243What are the differences between useEffect and useLayoutEffect hooks
244What are the differences between Functional and Class Components
245What is strict mode in React?
246What is the benefit of strict mode?
247Why does strict mode render twice in React?
248What are the rules of JSX?
249What is the reason behind multiple JSX tags to be wrapped?
250How do you prevent mutating array variables?
251What are capture phase events?
252How does React updates screen in an application?
253How does React batch multiple state updates?
254Is it possible to prevent automatic batching?
255What is React hydration?
256How do you update objects inside state?
257How do you update nested objects inside state?
258How do you update arrays inside state?
259How do you use immer library for state updates?
260What are the benefits of preventing the direct state mutations?
261What are the preferred and non-preferred array operations for updating the state?
262[What will happen by defin
3.8.9

2 months ago

3.8.6

2 months ago

3.2.4

2 months ago

2.3.4

2 months ago