ReactJS Interview Questions
Here is the updated and renumbered list of questions:
- Destructuring of arrays/objects
- Template literals
- Default parameters
- Arrow functions vs Normal Functions
- Spread operators
- Blocked-scoped Splice vs Slice
- Object Literals
- Destructuring
- let and const vs var
- Currying and Closures
- super keyword in JavaScript
- Pure functions
- Higher-Order (HOC) functions
- Data types in JavaScript
- Virtual DOM vs Real DOM
- What is React
- What is Babel
- ECMAScript
- What is NodeJS
- Refs in React
- Keys in React
- HOC - Higher-Order Component
- Class vs Functional components
- What is flexbox
- Box Model
- Life cycle methods in React
- Hooks in React
- What is Redux
- Actions and Reducers
- Redux Persist
- Middlewares in Redux - Thunk, Saga
- Redux Applymiddleware
- Redux connect
- Redux Async Storage
- Redux Hooks
- Promises vs Async/Await
- Promise chaining in JavaScript
- How does JavaScript figure out that a promise is resolved
- Promise states
- === vs == operator
- Self-invoked functions
- Cookies vs Session Storage vs Local Storage
- Prototype in JS
- Asynchronous JavaScript
- Callbacks
- Callback hell
- Why Redux is used mostly
- Debouncing and Throttling
- Events in JS
- Bind and This in JS
- How to prevent re-renders in React
- Threads in JS
- State vs Props
- TypeScript vs JavaScript
- Git Rebase vs Git Merge
- Git cherry-pick
- What is a regular expression
- REM and EM in CSS
- React Navigation
- WebViews in React
- What is CI/CD
- What is Push Notification
- What is Firebase
- Call and Apply in JS
- SQL vs NoSQL
- What is RDBMS
- Angular vs React
- What is ExpressJS
- AJAX, API, and JSON
- Event Loop in NodeJS
- Why do we import React on top of the file
- CSS Transition
- React Pure Components
- Hoisting in JS
- How to Improve the performance of your web applications
- How to improve the performance of your React application
- Write React component without JSX
- Iterators and Generators
- Symbol in JS
- Class Inheritance
- Abstract Class
- Lazy loading in React
- Session management
- Web Security Fundamentals
- Alerts and Metrics of Web Applications
- REST and APIs
- Ways to debug web applications
- What is Docker
- Shallow comparison vs Deep comparison in React
- PropTypes in React
- Preference order in CSS
- Explain the entire process (what actually happens in the backend) starting from sending requests from client to server and then back to the client
- Client Side Rendering vs Server Side Rendering vs Static Site Generation
- Purpose of Package.lock json
- Mono Repo vs Multi Repo
- How ESlint works internally
- SSL Pinning and Auth
- Abstract Syntax Tree
- How to Reuse React Native in Web
- New Feature additions in React Native/React?
- How we will measure slowness in the Web/App?
- Forward Ref, Scroll to Index, paginated flatlist, extra data, onEndReach
Q103. Monolithic vs Microservice architecture
Ans. Link
Q104. Facade Structural Design Pattern
Ans. Link
Q105. Creator of JavaScript
Ans. JavaScript was invented by Brendan Eich in 1995. It was developed for Netscape 2 and became the ECMA-262 standard in 1997. It took Eich only 10 days to develop the scripting language, then known as Mocha. He co-founded the Mozilla project.
Q106. ECMAScript
Ans. ECMAScript is a JavaScript standard meant to ensure the interoperability of web pages across different web browsers. It is standardized by Ecma International according to the document ECMA-262. Designed by Brendan Eich. Interoperability - the ability of computer systems or software to exchange and make use of information. Example: A USB flash drive works on any USB environment because it follows certain USB specifications.
Q107. Top ES6 Features
Ans. Link
Q108. ES6 to ES11 Features
Ans. Link
Q109. Submodules in GitHub
Ans. Link
Q110. Call, apply, bind, map, filter, for, while
Q111. Syntax - async, promise, switch
Q112. mapStateToProps
Q113. mapDispatchToProps
Q114. Controlled and uncontrolled components
Q115. Keys in React
Q116. How to optimize a React app
Q117. To find prime numbers between 1-1000
Q118. Find the 2nd largest element in an array
Q119. To find repeated characters in a string
Q120. To find repeated characters in an array
Q121. To find the max repeated character in a string
Q122. To find the max repeated character in an array
Q123. FlatList
Q124. Bridging
Q125. How it works under the hood
Q126. Optimization
Q127. Threads
Q128. Reverse a linked list
Q129. Rotate an array
Q130. How can we fetch API data without using useEffect hook?
Q131. What are the security measures which should be considered during development?
Q132. Can we return setData inside a component?
Q133. Multiple useEffects in a same component?
Q134. Higher order components or custom hooks? Which approach will you follow.
Q135. Why do we need currying in JS? Explain with example.
Q136. Explain Array prototyping, generators.
Q137. Explain Middlewares in React which you have used?
Q138. Function closures and bind method difference.
Q139. Explain service and web workers.
Q140. Write a program to fetch real time data for a cricket/football match.
Q141. Stateless components?
Q142. How do you fetch multiple APIs in a single time.
Q143. Interceptors in axios library?
Q144. React suspense?
Q145. How will you select between SSR and CSR for you application? What parameters will you consider.
Q146. What is A11y issues? How do you handle it?
Q147. Box model, CSS animation, SASS variables and mixins in CSS.
Q148. How authentication works with JWT?
Q149. What is selective hydration?
Q150. Crawlers, indexing a page and what are the ways?
Q151. Explain redux architecture.
Q152. How will you set redirects using axios library.
Q153. Different types of object creation.
Q154. Explain hoisting, TDZ.
Q155. Explain IIFE with example.
Q156. What is obj literal and JSON obj.
Q157. First class functions.
Q158. Error pages creation
Q159. Scopes in JS
Q160. Event Loop - Task/MicroTask Queues.
Q161. Second Largest number from array without using Math, sort functions.
Q162. Synthetic events
Q163. Cookies, localStorage and sessionStorage
Q164. How Babel works?
Q165. Explain webpack, parcel and some of its features.
Q166. Challenges with react js
Q167. Memoization techniques, pure functions and pure components.
Q168. HTTP methods...explain
Q169. Call, apply and bind
Q170. Arrow functions, anonymous functions, this keyword
Q171. ES6 features.
Q172. Create a triangle using CSS
Q173. Explain rate limiting and write a small code to demonstrate.
Q174. ESLint and security plugins used in your project?
Q175. CORS, CSP and XSS explain
Q176. What are tree shaking, debouncing, and throttling?
Q177. How can you write a program for form validation without using any library?
Q178. What are some common array operations in JavaScript?
Q179. How do you perform nested array operations and flattening of an array?
Q180. What are some performance optimization techniques in web development?
Q181. Explain shallow and deep copy. How would you create each in JavaScript?
Q182. What are various React hooks and their syntax? Examples include useParam, useReducer, useQuery, useContext.
Q183. Explain the lifecycle methods in functional components in React.
Q184. What is the MVC architecture of a React application?
Q185. Is React a library or a framework? Why?
Q186. How can you display string elements coming from a URL in a React component?
Q187. How to invoke a function from a super nested child component when the function is defined in the parent component?
Q188. What are functional components and class components in React?
Q189. Define what hooks are in React.
Q190. Describe the use and implementation of hooks in React.