Project Icon

reactjs-interview-questions

深入剖析React面试题及开发实践

该项目收录了300多个React相关面试问题及答案,涵盖React核心概念、组件、状态管理、路由、国际化和测试等多个方面。内容由浅入深,既包含基础知识,也涉及高级主题和最佳实践,有助于开发者全面掌握React技术栈。项目持续更新,紧跟React生态发展,是React开发人员的重要学习资源。

React Interview Questions & Answers

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


💡 Nail React interviews with questions and solutions from ex-interviewers! Try GreatFrontEnd → 💡


🚀 Ace React interview questions with solutions from FAANG+ companies! Try FrontendLead → 🚀



ZTM Logo

  1. I recommend this React course if you’re serious about learning React and want to go beyond the basics
  2. Want to ace your coding interview and get hired at your dream company? Take this coding interview bootcamp


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

Hide/Show 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 <Router> components of React Router v6?
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
110[Are there any similarities between Redux and
项目侧边栏1项目侧边栏2
推荐项目
Project Cover

豆包MarsCode

豆包 MarsCode 是一款革命性的编程助手,通过AI技术提供代码补全、单测生成、代码解释和智能问答等功能,支持100+编程语言,与主流编辑器无缝集成,显著提升开发效率和代码质量。

Project Cover

AI写歌

Suno AI是一个革命性的AI音乐创作平台,能在短短30秒内帮助用户创作出一首完整的歌曲。无论是寻找创作灵感还是需要快速制作音乐,Suno AI都是音乐爱好者和专业人士的理想选择。

Project Cover

有言AI

有言平台提供一站式AIGC视频创作解决方案,通过智能技术简化视频制作流程。无论是企业宣传还是个人分享,有言都能帮助用户快速、轻松地制作出专业级别的视频内容。

Project Cover

Kimi

Kimi AI助手提供多语言对话支持,能够阅读和理解用户上传的文件内容,解析网页信息,并结合搜索结果为用户提供详尽的答案。无论是日常咨询还是专业问题,Kimi都能以友好、专业的方式提供帮助。

Project Cover

阿里绘蛙

绘蛙是阿里巴巴集团推出的革命性AI电商营销平台。利用尖端人工智能技术,为商家提供一键生成商品图和营销文案的服务,显著提升内容创作效率和营销效果。适用于淘宝、天猫等电商平台,让商品第一时间被种草。

Project Cover

吐司

探索Tensor.Art平台的独特AI模型,免费访问各种图像生成与AI训练工具,从Stable Diffusion等基础模型开始,轻松实现创新图像生成。体验前沿的AI技术,推动个人和企业的创新发展。

Project Cover

SubCat字幕猫

SubCat字幕猫APP是一款创新的视频播放器,它将改变您观看视频的方式!SubCat结合了先进的人工智能技术,为您提供即时视频字幕翻译,无论是本地视频还是网络流媒体,让您轻松享受各种语言的内容。

Project Cover

美间AI

美间AI创意设计平台,利用前沿AI技术,为设计师和营销人员提供一站式设计解决方案。从智能海报到3D效果图,再到文案生成,美间让创意设计更简单、更高效。

Project Cover

AIWritePaper论文写作

AIWritePaper论文写作是一站式AI论文写作辅助工具,简化了选题、文献检索至论文撰写的整个过程。通过简单设定,平台可快速生成高质量论文大纲和全文,配合图表、参考文献等一应俱全,同时提供开题报告和答辩PPT等增值服务,保障数据安全,有效提升写作效率和论文质量。

投诉举报邮箱: service@vectorlightyear.com
@2024 懂AI·鲁ICP备2024100362号-6·鲁公网安备37021002001498号