[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-seo-391675-105":3,"detail-sidebar-cat-0-en-105":81,"doc-detail-391675-en":131},{"code":4,"msg":5,"data":6},0,"ok",{"site_id":7,"language":8,"slug":9,"title":10,"keywords":11,"description":12,"schema_data":13,"social_meta":74,"head_meta":76,"extra_data":78,"updated_unix":80},105,"en","react-interview-questions-28-likely-react-interview-questions-example-answers","React interview questions - 28 likely React interview questions - example answers","","A comprehensive set of likely React interview questions paired with example answers, designed as a quick reference and rehearsal exercise for candidates targeting React roles in 2020–2021. Covers core fundamentals such as virtual DOM vs real DOM, JSX, props and prop drilling, state and component lifecycle, hooks like useEffect, refs, Context API, and advanced patterns including fragments, class-based components, higher-order components, and portals. Includes guidance on key points to mention and common wrong answers to avoid.",{"@graph":14,"@context":73},[15,34,56],{"@type":16,"itemListElement":17},"BreadcrumbList",[18,23,27,31],{"item":19,"name":20,"@type":21,"position":22},"https://docshare.wps.com","Home","ListItem",1,{"item":24,"name":25,"@type":21,"position":26},"https://docshare.wps.com/document/","Document",2,{"item":28,"name":29,"@type":21,"position":30},"https://docshare.wps.com/document/exam/","Exam",3,{"item":32,"name":10,"@type":21,"position":33},"https://docshare.wps.com/document/react-interview-questions-28-likely-react-interview-questions-example-answers/391675/",4,{"url":32,"name":10,"@type":35,"image":36,"author":41,"headline":10,"publisher":44,"fileFormat":47,"inLanguage":8,"description":12,"dateModified":48,"datePublished":49,"encodingFormat":47,"isAccessibleForFree":50,"interactionStatistic":51},"DigitalDocument",{"url":37,"@type":38,"width":39,"height":40},"https://docshare.wps.com/thumbnails/react-interview-questions-28-likely-react-interview-questions-example-answers/391675.png","ImageObject",300,407,{"name":42,"@type":43},"Angel","Person",{"url":19,"name":45,"@type":46},"DocShare","Organization","application/pdf","2026-11-09","2026-09-25",true,{"@type":52,"interactionType":53,"userInteractionCount":55},"InteractionCounter",{"@type":54},"ViewAction",13,{"@type":57,"mainEntity":58},"FAQPage",[59,65,69],{"name":60,"@type":61,"acceptedAnswer":62},"What is the difference between the virtual DOM and the real DOM?","Question",{"text":63,"@type":64},"The real DOM represents the HTML document as a tree and browser rendering traverses and rerenders nodes directly. The virtual DOM is a React-maintained in-memory representation that React diffs and reconciles with the previous version to update the real DOM efficiently.","Answer",{"name":66,"@type":61,"acceptedAnswer":67},"Is the virtual DOM the same as the shadow DOM?",{"text":68,"@type":64},"No. The virtual DOM is a UI programming concept used to improve rendering performance, while the Shadow DOM is a browser technology for scoping variables and CSS in web components.",{"name":70,"@type":61,"acceptedAnswer":71},"What argument does useEffect take, and when does it run?",{"text":72,"@type":64},"useEffect takes a function as its argument. It runs according to the effect’s dependencies (and thus timing) defined for that hook, and React will execute it to handle side effects after rendering.","https://schema.org",{"og:url":32,"og:type":75,"og:title":10,"og:site_name":45,"og:description":12},"article",{"robots":77,"canonical":32},"index,follow",{"doc_id":79,"site_id":7},391675,1790436635,{"code":4,"msg":82,"data":83},"success",[84,88,92,95,100,105,110,115,120,123,127],{"id":22,"doc_module":4,"doc_module_name":25,"category_name":85,"show_sort_weight":86,"slug":87},"Story & Novel",90,"story-novel",{"id":26,"doc_module":4,"doc_module_name":25,"category_name":89,"show_sort_weight":90,"slug":91},"Literature",80,"literature",{"id":33,"doc_module":4,"doc_module_name":25,"category_name":29,"show_sort_weight":93,"slug":94},70,"exam",{"id":96,"doc_module":4,"doc_module_name":25,"category_name":97,"show_sort_weight":98,"slug":99},5,"Comic",60,"comic",{"id":101,"doc_module":4,"doc_module_name":25,"category_name":102,"show_sort_weight":103,"slug":104},6,"Technology",50,"technology",{"id":106,"doc_module":4,"doc_module_name":25,"category_name":107,"show_sort_weight":108,"slug":109},7,"Healthcare",40,"healthcare",{"id":111,"doc_module":4,"doc_module_name":25,"category_name":112,"show_sort_weight":113,"slug":114},8,"Research & Report",30,"research-report",{"id":116,"doc_module":4,"doc_module_name":25,"category_name":117,"show_sort_weight":118,"slug":119},9,"Religion & Spirituality",20,"religion-spirituality",{"id":118,"doc_module":4,"doc_module_name":25,"category_name":121,"show_sort_weight":118,"slug":122},"World Cup","world-cup",{"id":124,"doc_module":4,"doc_module_name":25,"category_name":125,"show_sort_weight":124,"slug":126},10,"Lifestyle","lifestyle",{"id":128,"doc_module":4,"doc_module_name":25,"category_name":129,"show_sort_weight":96,"slug":130},19,"General","general",{"code":4,"msg":82,"data":132},{"doc_id":79,"user_id":133,"nickname":42,"user_avatar":134,"doc_module":4,"category_id":33,"category_name":29,"doc_title":10,"doc_description":12,"doc_content":135,"file_id":136,"file_url":137,"file_type":138,"file_size":139,"view_count":55,"is_deleted":4,"is_public":22,"is_downloadable":22,"audit_status":22,"page_count":140,"language":141,"language_code":8,"site_id":7,"html_lang":8,"table_of_contents":142,"faqs":143,"seo_title":144,"seo_description":12,"update_tm":145,"read_time":98,"preview_page_count":4},687207412472,"https://ap-avatar.wpscdn.com/davatar_155a257f0dc6eb9ab79c44ca47cae57d","19/11/2020 React interview questions  \nReact interview questions  \nReact interview questions  \nALEX BOOKER  \n19 NOV 2020 • 17 MIN READ  \nIf you want to l and a great React job in 2020 or 2021, this is the post  \nfor you 􀃯.  \nWe' re bringing you this post on the back of our new React Interview Questions course with the awesome @Cassidoo 􀃎  \nIn that course, Cassidoo d raws on her professional experience  \nworking at Netlify ( and before that, CodePen) to share 28 likely React  \ninterview questions and example answers.  \nYou' re reading an epic 4500 word version of those same common  \nReact interview questions and example answers. Use this as a quick  \nreference or as an exercise to rehearse your answers aloud. We have  \nalso included a PDF below in case you'd like something to download and print 􀃱.  \nHere, we' re listing all the same questions plus vetted answers for you to adapt. Use this as inspiration to phrase eloquent and con»dent  \nanswers that will WOW 􀂰 your soon-to-be employer.  \nFor each question, we aim to highlight:  \n 􀁂 The key thing to mention in your answer  \n[https://blog.scrimba.com/react-interview-questions/ 1/24](https://blog.scrimba.com/react-interview-questions/ 1/24)  \n19/11/2020 React interview questions  \nReact interview questions  \n ⛔ In some cases, we' ll also mention common wrong answers for you to avoid at all costs  \nWithout further ado, here are the questions (listed in the same order that they appear in the course, in case you'd like to use these resources together):  \n| SUBJECT | QUESTION |\n| --- | --- |\n| React DOM | What is the difference between the virtual DOM and the |\n|  | Is the virtual DOM the same as the shadow DOM? |\n| React limitations | What are the limitations of React? |\n| JSX | What is JSX? |\n|  | What is the difference between an element and compon |\n|  | Can you write React without JSX? |\n| Props | How do you pass a value from a parent to child? |\n|  | How do you pass a value from child to parent? |\n|  | What is prop drilling? |\n|  | Can a child component modify its own props? |\n| State and lifecycle | What is the difference between props and state? |\n|  | How does state in a class component differ from state in |\n|  | What is the component lifecycle? |\n|  | How do you update lifecycle in functional components? |\n| Effects | What argument does useEffect take? |\n|  | When does the useEffect function run? |\n|  | What is the useEffect function's return value? |\n| Refs | What is the difference between ref and state variables? |\n\n[https://blog.scrimba.com/react-interview-questions/ 2/24](https://blog.scrimba.com/react-interview-questions/ 2/24)  \n19/11/2020 React interview questions  \n\n|  |  |\n| --- | --- |\n|  | When is the best time to use refs? |\n|  | What is the proper way to update a ref in a function com |\n| Context | What is the difference between the Context API and prop |\n|  | When shouldn't you use the Context API? |\n| Other | What is a Fragment? |\n|  | When should you create class-based component versus |\n|  | What is higher order component? |\n|  | What is portal? |\n|  | What are uncontrolled and uncontrolled components? |\n\nReact interview questions  \nClick here to download the PDF ⬇  \nReact DOM  \nWhat is the difference between the virtual DOM and the real DOM?  \nThe DOM represents an HTML document as a tree structure wherein each node represents part of the document (for example, an element, element attribute, or text):  \n[https://blog.scrimba.com/react-interview-questions/ 3/24](https://blog.scrimba.com/react-interview-questions/ 3/24)  \n19/11/2020 React interview questions  \nReact interview questions  \nUsing vanilla JavaScript and the DOM API, you can access any element you like (for example, using document .getElementById ) and update it directly.  \nWhen you do this, the browser engine traverses the DOM and re  \nrenders each node even if that node hasn't changed since the previous  \nrender. This can be noticeably inef»cient 􀀗  \nImagine a scenario where you need to update ","cbCailhTVJnUCZQJ","https://ap.wps.com/l/cbCailhTVJnUCZQJ","pdf",1301875,24,"English","# React DOM\n## Virtual DOM vs real DOM\n# JSX\n# Props\n# State and lifecycle\n# Effects\n# Refs\n# Context and other React concepts","[{\"question\":\"What is the difference between the virtual DOM and the real DOM?\",\"answer\":\"The real DOM represents the HTML document as a tree and browser rendering traverses and rerenders nodes directly. The virtual DOM is a React-maintained in-memory representation that React diffs and reconciles with the previous version to update the real DOM efficiently.\"},{\"question\":\"Is the virtual DOM the same as the shadow DOM?\",\"answer\":\"No. The virtual DOM is a UI programming concept used to improve rendering performance, while the Shadow DOM is a browser technology for scoping variables and CSS in web components.\"},{\"question\":\"What argument does useEffect take, and when does it run?\",\"answer\":\"useEffect takes a function as its argument. It runs according to the effect’s dependencies (and thus timing) defined for that hook, and React will execute it to handle side effects after rendering.\"}]","React interview questions - 28 likely React interview questions - example answers | PDF",1790357247]