[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"$KiqIp5Qu8t":3,"blog-\u002Fblog\u002Fmy-top-react-interview-questions":52,"blogToc-\u002Fblog\u002Fmy-top-react-interview-questions":1424,"blog-surrounding-\u002Fblog\u002Fmy-top-react-interview-questions":2404,"blog-similar-posts-\u002Fblog\u002Fmy-top-react-interview-questions":2413},{"id":4,"extension":5,"items":6,"meta":49,"stem":50,"__hash__":51},"menu\u002Fmenu.json","json",[7,12,16,20,24,28,32,36,41,45],{"i18nId":8,"to":9,"ariaLabel":10,"mainNavigation":11},"components.menu.home","\u002F","Home",true,{"i18nId":13,"to":14,"ariaLabel":15,"mainNavigation":11},"components.menu.about","\u002Fhire-me","About",{"i18nId":17,"to":18,"ariaLabel":19,"mainNavigation":11},"components.menu.testimonials","\u002Ftestimonials","Testimonials",{"i18nId":21,"to":22,"ariaLabel":23},"components.menu.contact","\u002Fcontact","Contact",{"i18nId":25,"to":26,"ariaLabel":27,"mainNavigation":11},"components.menu.blog","\u002Fblog","Blog",{"i18nId":29,"to":30,"ariaLabel":31,"mainNavigation":11},"components.menu.tips","\u002Fvue-tips","Vue Tips",{"i18nId":33,"to":34,"ariaLabel":35,"mainNavigation":11},"components.menu.projects","\u002Fprojects","Projects",{"i18nId":37,"to":38,"ariaLabel":39,"mainNavigation":40},"components.menu.stats","\u002Fstats","stats",false,{"i18nId":42,"to":43,"ariaLabel":44,"mainNavigation":40},"components.menu.businessCard","\u002Fbusiness-card","Business Card",{"i18nId":46,"to":47,"ariaLabel":48,"mainNavigation":40},"components.menu.publications","\u002Fpublications","Publications",{},"menu","njLT1QoRt2Dv8QWoVmH8xdTAiDywSj0bxBQdmoyWUE0",{"id":53,"title":54,"body":55,"categories":1404,"cover":1409,"date":1410,"description":61,"extension":1411,"lastUpdated":1412,"meta":1413,"navigation":11,"ogImage":1412,"path":1414,"readingTime":1415,"robots":1412,"schemaOrg":1412,"seo":1420,"sitemap":1421,"stem":1422,"tags":1412,"__hash__":1423},"blog\u002Fblog\u002Fmy-top-react-interview-questions\u002Findex.md","My Top React Interview Questions",{"type":56,"value":57,"toc":1378},"minimark",[58,62,67,77,80,84,111,115,126,130,139,148,151,193,197,230,234,242,245,250,255,262,368,372,383,486,490,494,501,676,680,683,955,959,968,1013,1017,1020,1028,1031,1035,1038,1041,1048,1052,1055,1058,1061,1069,1073,1076,1079,1083,1086,1106,1121,1138,1142,1187,1191,1194,1197,1212,1216,1225,1228,1252,1255,1259,1262,1270,1274,1277,1294,1300,1304,1312,1316,1328,1332,1344,1347,1350,1354,1357,1366,1374],[59,60,61],"p",{},"This article summarizes a list of React interview questions that I would ask candidates and that I get often asked in interviews.",[63,64,66],"h2",{"id":65},"_1-what-is-react","1. What is React?",[59,68,69,76],{},[70,71,75],"a",{"href":72,"rel":73},"https:\u002F\u002Freactjs.org\u002F",[74],"nofollow","React"," is a \"JavaScript library for building user interfaces\" which was developed by Facebook in 2011.",[59,78,79],{},"It’s the V in the MVC (Model - View -Controller), so it is rather an open-source UI library than a framework.",[63,81,83],{"id":82},"_2-what-are-the-advantages-of-react","2. What are the advantages of React?",[85,86,87,96,99,102,105,108],"ul",{},[88,89,90,91,95],"li",{},"Good performance: due to VDOM, see ",[70,92,94],{"href":93},"\u002Fblog\u002Fmy-top-react-interview-questions#7-what-is-the-virtual-dom","#17",".",[88,97,98],{},"Easy to learn: with basic JavaScript knowledge you can start building applications. Frameworks like Angular require more knowledge about other technologies and patterns like RxJS, TypeScript, and Dependency Injection.",[88,100,101],{},"One-way data flow: this flow is also called \"parent to child\" or \"top to bottom\" and prevents errors and facilitates debugging.",[88,103,104],{},"Reusable components: Re-using React components in other parts of the code or even in different projects can be done with little or no changes.",[88,106,107],{},"Huge community: The community supplies a ton of libraries that can be used to build React applications.",[88,109,110],{},"It is very popular among developers.",[63,112,114],{"id":113},"_3-what-are-the-disadvantages-of-react","3. What are the disadvantages of React?",[85,116,117,120,123],{},[88,118,119],{},"As React provides only the View part of the MVC model you mostly will rely on other technologies in your projects as well. Therefore, every React project might look quite different.",[88,121,122],{},"Some people think that JSX is too difficult to grasp and too complex.",[88,124,125],{},"Often poor documentation for React and its libraries.",[63,127,129],{"id":128},"_4-what-is-jsx","4. What is JSX?",[59,131,132,133,138],{},"JSX (JavaScript XML) allows us to write HTML inside JavaScript. The ",[70,134,137],{"href":135,"rel":136},"https:\u002F\u002Freactjs.org\u002Fdocs\u002Fintroducing-jsx.html",[74],"official docs"," describe it as \"syntax extension to JavaScript\".",[59,140,141,142,147],{},"React recommends using JSX, but it is also possible to create applications ",[70,143,146],{"href":144,"rel":145},"https:\u002F\u002Freactjs.org\u002Fdocs\u002Freact-without-jsx.html",[74],"without using JSX"," at all.",[59,149,150],{},"A simple JSX example:",[152,153,158],"pre",{"className":154,"code":155,"language":156,"meta":157,"style":157},"language-javascript shiki shiki-themes github-light poimandres poimandres","const element = \u003Ch1>Hello, world!\u003C\u002Fh1>\n","javascript","",[159,160,161],"code",{"__ignoreMap":157},[162,163,166,170,174,177,181,185,188,190],"span",{"class":164,"line":165},"line",1,[162,167,169],{"class":168},"slWGy","const",[162,171,173],{"class":172},"sGRIV"," element",[162,175,176],{"class":168}," =",[162,178,180],{"class":179},"sMzB8"," \u003C",[162,182,184],{"class":183},"s8PnL","h1",[162,186,187],{"class":179},">Hello, world!\u003C\u002F",[162,189,184],{"class":183},[162,191,192],{"class":179},">\n",[63,194,196],{"id":195},"_5-how-to-pass-data-between-components","5. How to pass data between components?",[198,199,200,203,206],"ol",{},[88,201,202],{},"Use props to pass data from parent to child.",[88,204,205],{},"Use callbacks to pass data from child to parent.",[88,207,208,209],{},"Use any of the following methods to pass data among siblings:\n",[85,210,211,214,222],{},[88,212,213],{},"Integrating the methods mentioned above.",[88,215,216,217,95],{},"Using ",[70,218,221],{"href":219,"rel":220},"https:\u002F\u002Fredux.js.org\u002F",[74],"Redux",[88,223,224,225,95],{},"Utilizing ",[70,226,229],{"href":227,"rel":228},"https:\u002F\u002Freactjs.org\u002Fdocs\u002Fcontext.html#api",[74],"React's Context API",[63,231,233],{"id":232},"_6-what-are-the-differences-between-functional-and-class-components","6. What are the differences between functional and class components?",[59,235,236,241],{},[70,237,240],{"href":238,"rel":239},"https:\u002F\u002Freactjs.org\u002Fdocs\u002Fhooks-intro.html",[74],"Hooks"," were introduced in React 16.8. In previous versions, functional components were called stateless components and did not provide the same features as class components (e.g., accessing state). Hooks enable functional components to have the same features as class components. There are no plans to remove class components from React.",[59,243,244],{},"So let's take a look at the differences:",[246,247,249],"h3",{"id":248},"declaration-props","Declaration & Props",[251,252,254],"h4",{"id":253},"functional-component","Functional Component",[59,256,257,258,261],{},"Functional components are JavaScript functions and therefore can be declared using an arrow function or the ",[159,259,260],{},"function"," keyword. Props are simply function arguments and can be directly used inside JSX:",[152,263,265],{"className":154,"code":264,"language":156,"meta":157,"style":157},"const Card = (props) => {\n  return \u003Ch2>Title: {props.title}\u003C\u002Fh2>\n}\n\nfunction Card(props) {\n  return \u003Ch2>Title: {props.title}\u003C\u002Fh2>\n}\n",[159,266,267,294,317,323,329,344,363],{"__ignoreMap":157},[162,268,269,271,275,277,281,285,288,291],{"class":164,"line":165},[162,270,169],{"class":168},[162,272,274],{"class":273},"sBmmg"," Card",[162,276,176],{"class":168},[162,278,280],{"class":279},"sygvE"," (",[162,282,284],{"class":283},"sadQ_","props",[162,286,287],{"class":279},") ",[162,289,290],{"class":168},"=>",[162,292,293],{"class":279}," {\n",[162,295,297,301,303,305,308,310,313,315],{"class":164,"line":296},2,[162,298,300],{"class":299},"sdZ-l","  return",[162,302,180],{"class":179},[162,304,63],{"class":183},[162,306,307],{"class":179},">Title: {props",[162,309,95],{"class":279},[162,311,312],{"class":179},"title}\u003C\u002F",[162,314,63],{"class":183},[162,316,192],{"class":179},[162,318,320],{"class":164,"line":319},3,[162,321,322],{"class":279},"}\n",[162,324,326],{"class":164,"line":325},4,[162,327,328],{"emptyLinePlaceholder":11},"\n",[162,330,332,334,336,339,341],{"class":164,"line":331},5,[162,333,260],{"class":168},[162,335,274],{"class":273},[162,337,338],{"class":279},"(",[162,340,284],{"class":283},[162,342,343],{"class":279},") {\n",[162,345,347,349,351,353,355,357,359,361],{"class":164,"line":346},6,[162,348,300],{"class":299},[162,350,180],{"class":179},[162,352,63],{"class":183},[162,354,307],{"class":179},[162,356,95],{"class":279},[162,358,312],{"class":179},[162,360,63],{"class":183},[162,362,192],{"class":179},[162,364,366],{"class":164,"line":365},7,[162,367,322],{"class":279},[251,369,371],{"id":370},"class-component","Class component",[59,373,374,375,378,379,382],{},"Class components are declared using the ES6 ",[159,376,377],{},"class"," keyword. Props need to be accessed using the ",[159,380,381],{},"this"," keyword:",[152,384,386],{"className":154,"code":385,"language":156,"meta":157,"style":157},"class Card extends React.Component {\n  constructor(props) {\n    super(props)\n  }\n\n  render() {\n    return \u003Ch2>Title: {this.props.title}\u003C\u002Fh2>\n  }\n}\n",[159,387,388,409,420,433,438,442,450,476,481],{"__ignoreMap":157},[162,389,390,392,394,398,402,404,407],{"class":164,"line":165},[162,391,377],{"class":168},[162,393,274],{"class":273},[162,395,397],{"class":396},"sRZEA"," extends",[162,399,401],{"class":400},"s4XUm"," React",[162,403,95],{"class":279},[162,405,406],{"class":273},"Component",[162,408,293],{"class":279},[162,410,411,414,416,418],{"class":164,"line":296},[162,412,413],{"class":168},"  constructor",[162,415,338],{"class":279},[162,417,284],{"class":283},[162,419,343],{"class":279},[162,421,422,426,428,430],{"class":164,"line":319},[162,423,425],{"class":424},"sk88d","    super",[162,427,338],{"class":279},[162,429,284],{"class":179},[162,431,432],{"class":279},")\n",[162,434,435],{"class":164,"line":325},[162,436,437],{"class":279},"  }\n",[162,439,440],{"class":164,"line":331},[162,441,328],{"emptyLinePlaceholder":11},[162,443,444,447],{"class":164,"line":346},[162,445,446],{"class":273},"  render",[162,448,449],{"class":279},"() {\n",[162,451,452,455,457,459,462,464,466,468,470,472,474],{"class":164,"line":365},[162,453,454],{"class":299},"    return",[162,456,180],{"class":179},[162,458,63],{"class":183},[162,460,461],{"class":179},">Title: {",[162,463,381],{"class":424},[162,465,95],{"class":279},[162,467,284],{"class":179},[162,469,95],{"class":279},[162,471,312],{"class":179},[162,473,63],{"class":183},[162,475,192],{"class":179},[162,477,479],{"class":164,"line":478},8,[162,480,437],{"class":279},[162,482,484],{"class":164,"line":483},9,[162,485,322],{"class":279},[246,487,489],{"id":488},"handling-state","Handling state",[251,491,493],{"id":492},"functional-components","Functional components",[59,495,496,497,500],{},"In functional components we need to use the ",[159,498,499],{},"useState"," hook to be able to handle state:",[152,502,504],{"className":154,"code":503,"language":156,"meta":157,"style":157},"const Counter = (props) => {\n  const [counter, setCounter] = useState(0)\n\n  const increment = () => {\n    setCounter(++counter)\n  }\n\n  return (\n    \u003Cdiv>\n      \u003Cp>Count: {counter}\u003C\u002Fp>\n      \u003Cbutton onClick={increment}>Increment Counter\u003C\u002Fbutton>\n    \u003C\u002Fdiv>\n  )\n}\n",[159,505,506,525,560,564,580,594,598,602,609,619,634,655,665,671],{"__ignoreMap":157},[162,507,508,510,513,515,517,519,521,523],{"class":164,"line":165},[162,509,169],{"class":168},[162,511,512],{"class":273}," Counter",[162,514,176],{"class":168},[162,516,280],{"class":279},[162,518,284],{"class":283},[162,520,287],{"class":279},[162,522,290],{"class":168},[162,524,293],{"class":279},[162,526,527,530,533,536,539,542,545,548,552,554,558],{"class":164,"line":296},[162,528,529],{"class":168},"  const",[162,531,532],{"class":279}," [",[162,534,535],{"class":172},"counter",[162,537,538],{"class":279},", ",[162,540,541],{"class":172},"setCounter",[162,543,544],{"class":279},"] ",[162,546,547],{"class":168},"=",[162,549,551],{"class":550},"sHQ3f"," useState",[162,553,338],{"class":279},[162,555,557],{"class":556},"s6g4C","0",[162,559,432],{"class":279},[162,561,562],{"class":164,"line":319},[162,563,328],{"emptyLinePlaceholder":11},[162,565,566,568,571,573,576,578],{"class":164,"line":325},[162,567,529],{"class":168},[162,569,570],{"class":273}," increment",[162,572,176],{"class":168},[162,574,575],{"class":279}," () ",[162,577,290],{"class":168},[162,579,293],{"class":279},[162,581,582,585,587,590,592],{"class":164,"line":331},[162,583,584],{"class":550},"    setCounter",[162,586,338],{"class":279},[162,588,589],{"class":168},"++",[162,591,535],{"class":179},[162,593,432],{"class":279},[162,595,596],{"class":164,"line":346},[162,597,437],{"class":279},[162,599,600],{"class":164,"line":365},[162,601,328],{"emptyLinePlaceholder":11},[162,603,604,606],{"class":164,"line":478},[162,605,300],{"class":299},[162,607,608],{"class":279}," (\n",[162,610,611,614,617],{"class":164,"line":483},[162,612,613],{"class":179},"    \u003C",[162,615,616],{"class":183},"div",[162,618,192],{"class":179},[162,620,622,625,627,630,632],{"class":164,"line":621},10,[162,623,624],{"class":179},"      \u003C",[162,626,59],{"class":183},[162,628,629],{"class":179},">Count: {counter}\u003C\u002F",[162,631,59],{"class":183},[162,633,192],{"class":179},[162,635,637,639,642,646,648,651,653],{"class":164,"line":636},11,[162,638,624],{"class":179},[162,640,641],{"class":183},"button",[162,643,645],{"class":644},"sppiw"," onClick",[162,647,547],{"class":168},[162,649,650],{"class":179},"{increment}>Increment Counter\u003C\u002F",[162,652,641],{"class":183},[162,654,192],{"class":179},[162,656,658,661,663],{"class":164,"line":657},12,[162,659,660],{"class":179},"    \u003C\u002F",[162,662,616],{"class":183},[162,664,192],{"class":179},[162,666,668],{"class":164,"line":667},13,[162,669,670],{"class":279},"  )\n",[162,672,674],{"class":164,"line":673},14,[162,675,322],{"class":279},[251,677,679],{"id":678},"class-components","Class components",[59,681,682],{},"It's not possible to use React Hooks inside class components, therefore state handling is done differently in a class component:",[152,684,686],{"className":154,"code":685,"language":156,"meta":157,"style":157},"class Counter extends React.Component {\n  constructor(props) {\n    super(props)\n    this.state = { counter: 0 }\n    this.increment = this.increment.bind(this)\n  }\n\n  increment() {\n    this.setState((prevState) => {\n      return { counter: prevState.counter + 1 }\n    })\n  }\n\n  render() {\n    return (\n      \u003Cdiv>\n        \u003Cp>Count: {this.state.counter}\u003C\u002Fp>\n        \u003Cbutton onClick={this.increment}>Increment Counter\u003C\u002Fbutton>\n      \u003C\u002Fdiv>\n    )\n  }\n}\n",[159,687,688,704,714,724,752,781,785,789,796,817,843,848,852,856,862,869,878,904,929,939,945,950],{"__ignoreMap":157},[162,689,690,692,694,696,698,700,702],{"class":164,"line":165},[162,691,377],{"class":168},[162,693,512],{"class":273},[162,695,397],{"class":396},[162,697,401],{"class":400},[162,699,95],{"class":279},[162,701,406],{"class":273},[162,703,293],{"class":279},[162,705,706,708,710,712],{"class":164,"line":296},[162,707,413],{"class":168},[162,709,338],{"class":279},[162,711,284],{"class":283},[162,713,343],{"class":279},[162,715,716,718,720,722],{"class":164,"line":319},[162,717,425],{"class":424},[162,719,338],{"class":279},[162,721,284],{"class":179},[162,723,432],{"class":279},[162,725,726,729,731,734,736,739,743,746,749],{"class":164,"line":325},[162,727,728],{"class":424},"    this",[162,730,95],{"class":279},[162,732,733],{"class":179},"state",[162,735,176],{"class":168},[162,737,738],{"class":279}," {",[162,740,742],{"class":741},"srga6"," counter",[162,744,745],{"class":279},":",[162,747,748],{"class":556}," 0",[162,750,751],{"class":279}," }\n",[162,753,754,756,758,761,763,766,768,770,772,775,777,779],{"class":164,"line":331},[162,755,728],{"class":424},[162,757,95],{"class":279},[162,759,760],{"class":179},"increment",[162,762,176],{"class":168},[162,764,765],{"class":424}," this",[162,767,95],{"class":279},[162,769,760],{"class":179},[162,771,95],{"class":279},[162,773,774],{"class":550},"bind",[162,776,338],{"class":279},[162,778,381],{"class":424},[162,780,432],{"class":279},[162,782,783],{"class":164,"line":346},[162,784,437],{"class":279},[162,786,787],{"class":164,"line":365},[162,788,328],{"emptyLinePlaceholder":11},[162,790,791,794],{"class":164,"line":478},[162,792,793],{"class":273},"  increment",[162,795,449],{"class":279},[162,797,798,800,802,805,808,811,813,815],{"class":164,"line":483},[162,799,728],{"class":424},[162,801,95],{"class":279},[162,803,804],{"class":550},"setState",[162,806,807],{"class":279},"((",[162,809,810],{"class":283},"prevState",[162,812,287],{"class":279},[162,814,290],{"class":168},[162,816,293],{"class":279},[162,818,819,822,824,826,828,831,833,835,838,841],{"class":164,"line":621},[162,820,821],{"class":299},"      return",[162,823,738],{"class":279},[162,825,742],{"class":741},[162,827,745],{"class":279},[162,829,830],{"class":179}," prevState",[162,832,95],{"class":279},[162,834,535],{"class":179},[162,836,837],{"class":168}," +",[162,839,840],{"class":556}," 1",[162,842,751],{"class":279},[162,844,845],{"class":164,"line":636},[162,846,847],{"class":279},"    })\n",[162,849,850],{"class":164,"line":657},[162,851,437],{"class":279},[162,853,854],{"class":164,"line":667},[162,855,328],{"emptyLinePlaceholder":11},[162,857,858,860],{"class":164,"line":673},[162,859,446],{"class":273},[162,861,449],{"class":279},[162,863,865,867],{"class":164,"line":864},15,[162,866,454],{"class":299},[162,868,608],{"class":279},[162,870,872,874,876],{"class":164,"line":871},16,[162,873,624],{"class":179},[162,875,616],{"class":183},[162,877,192],{"class":179},[162,879,881,884,886,889,891,893,895,897,900,902],{"class":164,"line":880},17,[162,882,883],{"class":179},"        \u003C",[162,885,59],{"class":183},[162,887,888],{"class":179},">Count: {",[162,890,381],{"class":424},[162,892,95],{"class":279},[162,894,733],{"class":179},[162,896,95],{"class":279},[162,898,899],{"class":179},"counter}\u003C\u002F",[162,901,59],{"class":183},[162,903,192],{"class":179},[162,905,907,909,911,913,915,918,920,922,925,927],{"class":164,"line":906},18,[162,908,883],{"class":179},[162,910,641],{"class":183},[162,912,645],{"class":644},[162,914,547],{"class":168},[162,916,917],{"class":179},"{",[162,919,381],{"class":424},[162,921,95],{"class":279},[162,923,924],{"class":179},"increment}>Increment Counter\u003C\u002F",[162,926,641],{"class":183},[162,928,192],{"class":179},[162,930,932,935,937],{"class":164,"line":931},19,[162,933,934],{"class":179},"      \u003C\u002F",[162,936,616],{"class":183},[162,938,192],{"class":179},[162,940,942],{"class":164,"line":941},20,[162,943,944],{"class":279},"    )\n",[162,946,948],{"class":164,"line":947},21,[162,949,437],{"class":279},[162,951,953],{"class":164,"line":952},22,[162,954,322],{"class":279},[63,956,958],{"id":957},"_7-what-is-the-virtual-dom","7. What is the Virtual DOM?",[59,960,961,962,967],{},"The ",[70,963,966],{"href":964,"rel":965},"https:\u002F\u002Freactjs.org\u002Fdocs\u002Ffaq-internals.html#what-is-the-virtual-dom",[74],"Virtual DOM (VDOM)"," is a lightweight JavaScript object and it contains a copy of the real DOM.",[969,970,971,985],"table",{},[972,973,974],"thead",{},[975,976,977,981],"tr",{},[978,979,980],"th",{},"Real DOM",[978,982,984],{"align":983},"center","Virtual DOM",[986,987,988,997,1005],"tbody",{},[975,989,990,994],{},[991,992,993],"td",{},"Slow & expensive DOM manipulation",[991,995,996],{"align":983},"Fast & inexpensive DOM manipulation",[975,998,999,1002],{},[991,1000,1001],{},"Allows direct updates from HTML",[991,1003,1004],{"align":983},"It cannot be used to update HTML directly",[975,1006,1007,1010],{},[991,1008,1009],{},"Wastes too much memory",[991,1011,1012],{"align":983},"Less memory consumption",[63,1014,1016],{"id":1015},"_8-is-the-shadow-dom-the-same-as-the-virtual-dom","8. Is the Shadow DOM the same as the Virtual DOM?",[59,1018,1019],{},"No, they are different.",[59,1021,961,1022,1027],{},[70,1023,1026],{"href":1024,"rel":1025},"https:\u002F\u002Fdeveloper.mozilla.org\u002Fen-US\u002Fdocs\u002FWeb\u002FWeb_Components\u002FUsing_shadow_DOM",[74],"Shadow DOM"," is a browser technology designed primarily for scoping variables and CSS in web components.",[59,1029,1030],{},"The virtual DOM is a concept implemented by libraries in JavaScript on top of browser APIs.",[63,1032,1034],{"id":1033},"_9-what-is-react-fiber","9. What is \"React Fiber\"?",[59,1036,1037],{},"Fiber is the new reconciliation engine in React 16.",[59,1039,1040],{},"Its headline feature is incremental rendering: the ability to split rendering work into chunks and spread it out over multiple frames.",[59,1042,1043,95],{},[70,1044,1047],{"href":1045,"rel":1046},"https:\u002F\u002Fgithub.com\u002Facdlite\u002Freact-fiber-architecture",[74],"Read more",[63,1049,1051],{"id":1050},"_10-how-does-state-differ-from-props","10. How does state differ from props?",[59,1053,1054],{},"Both props and state are plain JavaScript objects.",[59,1056,1057],{},"Props (short for \"properties\") is an object of arbitrary inputs that are passed to a component by its parent component.",[59,1059,1060],{},"State are variables that are initialized and managed by the component and change over the lifetime of a specific instance of this component.",[59,1062,1063,1068],{},[70,1064,1067],{"href":1065,"rel":1066},"https:\u002F\u002Fkentcdodds.com\u002Fblog\u002Fprops-vs-state",[74],"This article from Kent C. Dodds"," provides a more detailed explanation.",[63,1070,1072],{"id":1071},"_11-what-are-the-differences-between-controlled-and-uncontrolled-components","11. What are the differences between controlled and uncontrolled components?",[59,1074,1075],{},"The value of an input element in a controlled React component is controlled by React.",[59,1077,1078],{},"The value of an input element in an uncontrolled React component is controlled by the DOM.",[63,1080,1082],{"id":1081},"_12-what-are-the-different-lifecycle-methods-in-react","12. What are the different lifecycle methods in React?",[59,1084,1085],{},"React class components provide these lifecycle methods:",[85,1087,1088,1094,1100],{},[88,1089,1090,1093],{},[159,1091,1092],{},"componentDidMount()",": Runs after the component output has been rendered to the DOM.",[88,1095,1096,1099],{},[159,1097,1098],{},"componentDidUpdate()",": Runs immediately after updating occurs.",[88,1101,1102,1105],{},[159,1103,1104],{},"componentWillUnmount()",": Runs before the component is unmounted from the DOM and is used to clear up the memory space.",[59,1107,1108,1109,1114,1115,1120],{},"There exist some other ",[70,1110,1113],{"href":1111,"rel":1112},"https:\u002F\u002Freactjs.org\u002Fdocs\u002Freact-component.html#rarely-used-lifecycle-methods",[74],"rarely used"," and ",[70,1116,1119],{"href":1117,"rel":1118},"https:\u002F\u002Freactjs.org\u002Fdocs\u002Freact-component.html#legacy-lifecycle-methods",[74],"legacy"," lifecycle methods.",[59,1122,1123,1124,1127,1128,538,1131,1134,1135,95],{},"Hooks are used in functional components instead of the above-mentioned lifecycle methods. The Effect Hook ",[159,1125,1126],{},"useEffect"," adds, for example, the ability to perform side effects and provides the same functionality as ",[159,1129,1130],{},"componentDidMount",[159,1132,1133],{},"componentDidUpdate",", and ",[159,1136,1137],{},"componentWillUnmount",[63,1139,1141],{"id":1140},"_13-how-can-you-improve-your-react-apps-performance","13. How can you improve your React app's performance?",[85,1143,1144,1161,1169,1178],{},[88,1145,1146,1147,1152,1153,1156,1157,1160],{},"Use ",[70,1148,1151],{"href":1149,"rel":1150},"https:\u002F\u002Freactjs.org\u002Fdocs\u002Freact-api.html#reactpurecomponent",[74],"React.PureComponent"," which is a base class like ",[159,1154,1155],{},"React.Component"," but it provides in some cases a performance boost if its ",[159,1158,1159],{},"render()"," function renders the same result given the same props and state.",[88,1162,1146,1163,1168],{},[70,1164,1167],{"href":1165,"rel":1166},"https:\u002F\u002Freactjs.org\u002Fdocs\u002Fhooks-reference.html#usememo",[74],"useMemo Hook"," to memoize functions that perform expensive calculations on every render. It will only recompute the memoized value if one of the dependencies (that are passed to the Hook) has changed.",[88,1170,1171,1172,1177],{},"State colocation is a process that moves the state as close to where you need it. Some React applications have a lot of unnecessary state in their parent component which makes the code harder to maintain and leads to a lot of unnecessary re-renders. ",[70,1173,1176],{"href":1174,"rel":1175},"https:\u002F\u002Fkentcdodds.com\u002Fblog\u002Fstate-colocation-will-make-your-react-app-faster",[74],"This article"," provides a detailed explanation about state colocation.",[88,1179,1180,1181,1186],{},"Lazy load your components to reduce the load time of your application. React ",[70,1182,1185],{"href":1183,"rel":1184},"https:\u002F\u002Freactjs.org\u002Fdocs\u002Freact-api.html#suspense",[74],"Suspense"," can be used to lazy load components.",[63,1188,1190],{"id":1189},"_14-what-are-keys-in-react","14. What are keys in React?",[59,1192,1193],{},"React needs keys to be able to identify which elements were changed, added, or removed. Each item in an array needs to have a key that provides a stable identity.",[59,1195,1196],{},"It's not recommended to use indexes for keys if the order of items may change as it can have a negative impact on the performance and may cause state issues. React will use indexes as keys if you do not assign an explicit key to list items.",[59,1198,1199,1200,1205,1206,1211],{},"Check out Robin Pokorny’s article for an ",[70,1201,1204],{"href":1202,"rel":1203},"https:\u002F\u002Fmedium.com\u002F@robinpokorny\u002Findex-as-a-key-is-an-anti-pattern-e0349aece318",[74],"in-depth explanation of the negative impacts of using an index as a key",". Here is another ",[70,1207,1210],{"href":1208,"rel":1209},"https:\u002F\u002Freactjs.org\u002Fdocs\u002Freconciliation.html#recursing-on-children",[74],"in-depth explanation about why keys are necessary"," if you’re interested in learning more.",[63,1213,1215],{"id":1214},"_15-what-are-higher-order-components","15. What are Higher Order Components?",[59,1217,1218,1219,1224],{},"A ",[70,1220,1223],{"href":1221,"rel":1222},"https:\u002F\u002Freactjs.org\u002Fdocs\u002Fhigher-order-components.html#use-hocs-for-cross-cutting-concerns",[74],"higher-order component (HOC)"," is a function that takes a component and returns a new component.",[59,1226,1227],{},"They are an advanced technique in React for reusing component logic and they are not part of the React API, per se. They are a pattern that emerges from React’s compositional nature:",[152,1229,1231],{"className":154,"code":1230,"language":156,"meta":157,"style":157},"const EnhancedComponent = higherOrderComponent(WrappedComponent)\n",[159,1232,1233],{"__ignoreMap":157},[162,1234,1235,1237,1240,1242,1245,1247,1250],{"class":164,"line":165},[162,1236,169],{"class":168},[162,1238,1239],{"class":172}," EnhancedComponent",[162,1241,176],{"class":168},[162,1243,1244],{"class":550}," higherOrderComponent",[162,1246,338],{"class":279},[162,1248,1249],{"class":179},"WrappedComponent",[162,1251,432],{"class":279},[59,1253,1254],{},"Whereas a component transforms props into UI, a higher-order component transforms a component into another component.",[63,1256,1258],{"id":1257},"_16-what-are-error-boundaries","16. What are error boundaries?",[59,1260,1261],{},"React 16 introduced a new concept of an “error boundary”.",[59,1263,1264,1269],{},[70,1265,1268],{"href":1266,"rel":1267},"https:\u002F\u002Freactjs.org\u002Fdocs\u002Ferror-boundaries.html#gatsby-focus-wrapper",[74],"Error boundaries"," are React components that catch JavaScript errors anywhere in their child component tree, log those errors, and display a fallback UI instead of the component tree that crashed. Error boundaries catch errors during rendering, in lifecycle methods, and in constructors of the whole tree below them.",[63,1271,1273],{"id":1272},"_17-why-hooks-were-introduced","17. Why Hooks were introduced?",[59,1275,1276],{},"Hooks solve a wide variety of seemingly unconnected problems in React that were encountered by Facebook over five years of writing and maintaining tens of thousands of components:",[85,1278,1279,1282,1285,1288],{},[88,1280,1281],{},"Hooks allow you to reuse stateful logic without changing your component hierarchy.",[88,1283,1284],{},"Hooks let you split one component into smaller functions based on what pieces are related (such as setting up a subscription or fetching data).",[88,1286,1287],{},"Hooks let you use more of React’s features without classes.",[88,1289,1290,1291,1293],{},"It removed the complexity of dealing with the ",[159,1292,381],{}," keyword inside class components.",[59,1295,1296],{},[70,1297,1047],{"href":1298,"rel":1299},"https:\u002F\u002Freactjs.org\u002Fdocs\u002Fhooks-intro.html#motivation",[74],[63,1301,1303],{"id":1302},"_18-what-is-the-purpose-of-useeffect-hook","18. What is the purpose of useEffect hook?",[59,1305,961,1306,1311],{},[70,1307,1310],{"href":1308,"rel":1309},"https:\u002F\u002Freactjs.org\u002Fdocs\u002Fhooks-reference.html#useeffect",[74],"Effect hook"," lets us perform side effects in functional components. It helps us to avoid redundant code in different lifecycle methods of a class component. It helps to group related code.",[63,1313,1315],{"id":1314},"_19-what-are-synthetic-events-in-react","19. What are synthetic events in React?",[59,1317,1318,1323,1324,1327],{},[70,1319,1322],{"href":1320,"rel":1321},"https:\u002F\u002Freactjs.org\u002Fdocs\u002Fevents.html",[74],"SyntheticEvent"," is a cross-browser wrapper around the browser's native event. It has the same API as the browser's native event, including ",[159,1325,1326],{},"stopPropagation()"," and `preventDefault(), except the events work identically across all browsers.",[63,1329,1331],{"id":1330},"_20-what-is-the-use-of-refs","20. What is the use of refs?",[59,1333,1218,1334,1339,1340,1343],{},[70,1335,1338],{"href":1336,"rel":1337},"https:\u002F\u002Freactjs.org\u002Fdocs\u002Fglossary.html#refs",[74],"Ref"," is a special attribute that can be attached to any component. It can be an\nobject created by ",[159,1341,1342],{},"React.createRef()",", a callback function or a string (in legacy API).",[59,1345,1346],{},"To get direct access to a DOM element or component instance you can use ref attribute as a callback function. The function receives the underlying DOM element or class instance (depending on the type of element) as its argument.",[59,1348,1349],{},"In most cases, refs should be used sparingly.",[63,1351,1353],{"id":1352},"conclusion","Conclusion",[59,1355,1356],{},"I hope this list of React interview questions will help you to get your next React position. Leave me a comment if you know any other important React interview questions.",[59,1358,1359,1360,1365],{},"If you liked this article, follow me on ",[70,1361,1364],{"href":1362,"rel":1363},"https:\u002F\u002Ftwitter.com\u002Fmokkapps",[74],"Twitter"," to get notified about new blog posts and more content from me.",[59,1367,1368,1369,95],{},"If you are looking for more interview questions you should take a look at this ",[70,1370,1373],{"href":1371,"rel":1372},"https:\u002F\u002Fgithub.com\u002Fsudheerj\u002Freactjs-interview-questions",[74],"list of top 500 React interview questions & answers",[1375,1376,1377],"style",{},"html pre.shiki code .slWGy, html code.shiki .slWGy{--shiki-light:#D73A49;--shiki-default:#91B4D5;--shiki-dark:#91B4D5}html pre.shiki code .sGRIV, html code.shiki .sGRIV{--shiki-light:#005CC5;--shiki-default:#E4F0FB;--shiki-dark:#E4F0FB}html pre.shiki code .sMzB8, html code.shiki .sMzB8{--shiki-light:#24292E;--shiki-default:#E4F0FB;--shiki-dark:#E4F0FB}html pre.shiki code .s8PnL, html code.shiki .s8PnL{--shiki-light:#22863A;--shiki-default:#5DE4C7;--shiki-dark:#5DE4C7}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sBmmg, html code.shiki .sBmmg{--shiki-light:#6F42C1;--shiki-default:#ADD7FF;--shiki-dark:#ADD7FF}html pre.shiki code .sygvE, html code.shiki .sygvE{--shiki-light:#24292E;--shiki-default:#A6ACCD;--shiki-dark:#A6ACCD}html pre.shiki code .sadQ_, html code.shiki .sadQ_{--shiki-light:#E36209;--shiki-default:#E4F0FB;--shiki-dark:#E4F0FB}html pre.shiki code .sdZ-l, html code.shiki .sdZ-l{--shiki-light:#D73A49;--shiki-default:#5DE4C7C0;--shiki-dark:#5DE4C7C0}html pre.shiki code .sRZEA, html code.shiki .sRZEA{--shiki-light:#D73A49;--shiki-default:#5DE4C7;--shiki-dark:#5DE4C7}html pre.shiki code .s4XUm, html code.shiki .s4XUm{--shiki-light:#6F42C1;--shiki-default:#A6ACCDC0;--shiki-dark:#A6ACCDC0}html pre.shiki code .sk88d, html code.shiki .sk88d{--shiki-light:#005CC5;--shiki-light-font-style:inherit;--shiki-default:#5DE4C7;--shiki-default-font-style:italic;--shiki-dark:#5DE4C7;--shiki-dark-font-style:italic}html pre.shiki code .sHQ3f, html code.shiki .sHQ3f{--shiki-light:#6F42C1;--shiki-default:#E4F0FBD0;--shiki-dark:#E4F0FBD0}html pre.shiki code .s6g4C, html code.shiki .s6g4C{--shiki-light:#005CC5;--shiki-default:#5DE4C7;--shiki-dark:#5DE4C7}html pre.shiki code .sppiw, html code.shiki .sppiw{--shiki-light:#6F42C1;--shiki-light-font-style:inherit;--shiki-default:#91B4D5;--shiki-default-font-style:italic;--shiki-dark:#91B4D5;--shiki-dark-font-style:italic}html pre.shiki code .srga6, html code.shiki .srga6{--shiki-light:#24292E;--shiki-default:#ADD7FF;--shiki-dark:#ADD7FF}",{"title":157,"searchDepth":296,"depth":296,"links":1379},[1380,1381,1382,1383,1384,1385,1389,1390,1391,1392,1393,1394,1395,1396,1397,1398,1399,1400,1401,1402,1403],{"id":65,"depth":296,"text":66},{"id":82,"depth":296,"text":83},{"id":113,"depth":296,"text":114},{"id":128,"depth":296,"text":129},{"id":195,"depth":296,"text":196},{"id":232,"depth":296,"text":233,"children":1386},[1387,1388],{"id":248,"depth":319,"text":249},{"id":488,"depth":319,"text":489},{"id":957,"depth":296,"text":958},{"id":1015,"depth":296,"text":1016},{"id":1033,"depth":296,"text":1034},{"id":1050,"depth":296,"text":1051},{"id":1071,"depth":296,"text":1072},{"id":1081,"depth":296,"text":1082},{"id":1140,"depth":296,"text":1141},{"id":1189,"depth":296,"text":1190},{"id":1214,"depth":296,"text":1215},{"id":1257,"depth":296,"text":1258},{"id":1272,"depth":296,"text":1273},{"id":1302,"depth":296,"text":1303},{"id":1314,"depth":296,"text":1315},{"id":1330,"depth":296,"text":1331},{"id":1352,"depth":296,"text":1353},[1405,1406,1407,1408],"development","career","react","frontend","blog\u002Fmy-top-react-interview-questions\u002Fcover_usumlz.jpg","2021-06-29","md",null,{},"\u002Fblog\u002Fmy-top-react-interview-questions",{"text":1416,"minutes":1417,"time":1418,"words":1419},"8 min read",7.855,471300,1571,{"title":54,"description":61},{"loc":1414,"lastmod":1410},"blog\u002Fmy-top-react-interview-questions\u002Findex","ebItASIQ6wRbTi1CTagomu_28qCzfckGjkATCbxklLo",{"id":1425,"title":54,"body":1426,"cover":1409,"description":61,"extension":1411,"meta":2398,"navigation":11,"path":1414,"robots":1412,"seo":2401,"sitemap":2402,"stem":1422,"__hash__":2403},"content\u002Fblog\u002Fmy-top-react-interview-questions\u002Findex.md",{"type":56,"value":1427,"toc":2372},[1428,1430,1432,1437,1439,1441,1457,1459,1467,1469,1474,1479,1481,1503,1505,1527,1529,1534,1536,1538,1540,1544,1626,1628,1634,1720,1722,1724,1728,1870,1872,1874,2110,2112,2117,2147,2149,2151,2156,2158,2160,2162,2164,2169,2171,2173,2175,2177,2182,2184,2186,2188,2190,2192,2206,2214,2224,2226,2252,2254,2256,2258,2266,2268,2273,2275,2295,2297,2299,2301,2306,2308,2310,2322,2327,2329,2334,2336,2343,2345,2352,2354,2356,2358,2360,2365,2370],[59,1429,61],{},[63,1431,66],{"id":65},[59,1433,1434,76],{},[70,1435,75],{"href":72,"rel":1436},[74],[59,1438,79],{},[63,1440,83],{"id":82},[85,1442,1443,1447,1449,1451,1453,1455],{},[88,1444,90,1445,95],{},[70,1446,94],{"href":93},[88,1448,98],{},[88,1450,101],{},[88,1452,104],{},[88,1454,107],{},[88,1456,110],{},[63,1458,114],{"id":113},[85,1460,1461,1463,1465],{},[88,1462,119],{},[88,1464,122],{},[88,1466,125],{},[63,1468,129],{"id":128},[59,1470,132,1471,138],{},[70,1472,137],{"href":135,"rel":1473},[74],[59,1475,141,1476,147],{},[70,1477,146],{"href":144,"rel":1478},[74],[59,1480,150],{},[152,1482,1483],{"className":154,"code":155,"language":156,"meta":157,"style":157},[159,1484,1485],{"__ignoreMap":157},[162,1486,1487,1489,1491,1493,1495,1497,1499,1501],{"class":164,"line":165},[162,1488,169],{"class":168},[162,1490,173],{"class":172},[162,1492,176],{"class":168},[162,1494,180],{"class":179},[162,1496,184],{"class":183},[162,1498,187],{"class":179},[162,1500,184],{"class":183},[162,1502,192],{"class":179},[63,1504,196],{"id":195},[198,1506,1507,1509,1511],{},[88,1508,202],{},[88,1510,205],{},[88,1512,208,1513],{},[85,1514,1515,1517,1522],{},[88,1516,213],{},[88,1518,216,1519,95],{},[70,1520,221],{"href":219,"rel":1521},[74],[88,1523,224,1524,95],{},[70,1525,229],{"href":227,"rel":1526},[74],[63,1528,233],{"id":232},[59,1530,1531,241],{},[70,1532,240],{"href":238,"rel":1533},[74],[59,1535,244],{},[246,1537,249],{"id":248},[251,1539,254],{"id":253},[59,1541,257,1542,261],{},[159,1543,260],{},[152,1545,1546],{"className":154,"code":264,"language":156,"meta":157,"style":157},[159,1547,1548,1566,1584,1588,1592,1604,1622],{"__ignoreMap":157},[162,1549,1550,1552,1554,1556,1558,1560,1562,1564],{"class":164,"line":165},[162,1551,169],{"class":168},[162,1553,274],{"class":273},[162,1555,176],{"class":168},[162,1557,280],{"class":279},[162,1559,284],{"class":283},[162,1561,287],{"class":279},[162,1563,290],{"class":168},[162,1565,293],{"class":279},[162,1567,1568,1570,1572,1574,1576,1578,1580,1582],{"class":164,"line":296},[162,1569,300],{"class":299},[162,1571,180],{"class":179},[162,1573,63],{"class":183},[162,1575,307],{"class":179},[162,1577,95],{"class":279},[162,1579,312],{"class":179},[162,1581,63],{"class":183},[162,1583,192],{"class":179},[162,1585,1586],{"class":164,"line":319},[162,1587,322],{"class":279},[162,1589,1590],{"class":164,"line":325},[162,1591,328],{"emptyLinePlaceholder":11},[162,1593,1594,1596,1598,1600,1602],{"class":164,"line":331},[162,1595,260],{"class":168},[162,1597,274],{"class":273},[162,1599,338],{"class":279},[162,1601,284],{"class":283},[162,1603,343],{"class":279},[162,1605,1606,1608,1610,1612,1614,1616,1618,1620],{"class":164,"line":346},[162,1607,300],{"class":299},[162,1609,180],{"class":179},[162,1611,63],{"class":183},[162,1613,307],{"class":179},[162,1615,95],{"class":279},[162,1617,312],{"class":179},[162,1619,63],{"class":183},[162,1621,192],{"class":179},[162,1623,1624],{"class":164,"line":365},[162,1625,322],{"class":279},[251,1627,371],{"id":370},[59,1629,374,1630,378,1632,382],{},[159,1631,377],{},[159,1633,381],{},[152,1635,1636],{"className":154,"code":385,"language":156,"meta":157,"style":157},[159,1637,1638,1654,1664,1674,1678,1682,1688,1712,1716],{"__ignoreMap":157},[162,1639,1640,1642,1644,1646,1648,1650,1652],{"class":164,"line":165},[162,1641,377],{"class":168},[162,1643,274],{"class":273},[162,1645,397],{"class":396},[162,1647,401],{"class":400},[162,1649,95],{"class":279},[162,1651,406],{"class":273},[162,1653,293],{"class":279},[162,1655,1656,1658,1660,1662],{"class":164,"line":296},[162,1657,413],{"class":168},[162,1659,338],{"class":279},[162,1661,284],{"class":283},[162,1663,343],{"class":279},[162,1665,1666,1668,1670,1672],{"class":164,"line":319},[162,1667,425],{"class":424},[162,1669,338],{"class":279},[162,1671,284],{"class":179},[162,1673,432],{"class":279},[162,1675,1676],{"class":164,"line":325},[162,1677,437],{"class":279},[162,1679,1680],{"class":164,"line":331},[162,1681,328],{"emptyLinePlaceholder":11},[162,1683,1684,1686],{"class":164,"line":346},[162,1685,446],{"class":273},[162,1687,449],{"class":279},[162,1689,1690,1692,1694,1696,1698,1700,1702,1704,1706,1708,1710],{"class":164,"line":365},[162,1691,454],{"class":299},[162,1693,180],{"class":179},[162,1695,63],{"class":183},[162,1697,461],{"class":179},[162,1699,381],{"class":424},[162,1701,95],{"class":279},[162,1703,284],{"class":179},[162,1705,95],{"class":279},[162,1707,312],{"class":179},[162,1709,63],{"class":183},[162,1711,192],{"class":179},[162,1713,1714],{"class":164,"line":478},[162,1715,437],{"class":279},[162,1717,1718],{"class":164,"line":483},[162,1719,322],{"class":279},[246,1721,489],{"id":488},[251,1723,493],{"id":492},[59,1725,496,1726,500],{},[159,1727,499],{},[152,1729,1730],{"className":154,"code":503,"language":156,"meta":157,"style":157},[159,1731,1732,1750,1774,1778,1792,1804,1808,1812,1818,1826,1838,1854,1862,1866],{"__ignoreMap":157},[162,1733,1734,1736,1738,1740,1742,1744,1746,1748],{"class":164,"line":165},[162,1735,169],{"class":168},[162,1737,512],{"class":273},[162,1739,176],{"class":168},[162,1741,280],{"class":279},[162,1743,284],{"class":283},[162,1745,287],{"class":279},[162,1747,290],{"class":168},[162,1749,293],{"class":279},[162,1751,1752,1754,1756,1758,1760,1762,1764,1766,1768,1770,1772],{"class":164,"line":296},[162,1753,529],{"class":168},[162,1755,532],{"class":279},[162,1757,535],{"class":172},[162,1759,538],{"class":279},[162,1761,541],{"class":172},[162,1763,544],{"class":279},[162,1765,547],{"class":168},[162,1767,551],{"class":550},[162,1769,338],{"class":279},[162,1771,557],{"class":556},[162,1773,432],{"class":279},[162,1775,1776],{"class":164,"line":319},[162,1777,328],{"emptyLinePlaceholder":11},[162,1779,1780,1782,1784,1786,1788,1790],{"class":164,"line":325},[162,1781,529],{"class":168},[162,1783,570],{"class":273},[162,1785,176],{"class":168},[162,1787,575],{"class":279},[162,1789,290],{"class":168},[162,1791,293],{"class":279},[162,1793,1794,1796,1798,1800,1802],{"class":164,"line":331},[162,1795,584],{"class":550},[162,1797,338],{"class":279},[162,1799,589],{"class":168},[162,1801,535],{"class":179},[162,1803,432],{"class":279},[162,1805,1806],{"class":164,"line":346},[162,1807,437],{"class":279},[162,1809,1810],{"class":164,"line":365},[162,1811,328],{"emptyLinePlaceholder":11},[162,1813,1814,1816],{"class":164,"line":478},[162,1815,300],{"class":299},[162,1817,608],{"class":279},[162,1819,1820,1822,1824],{"class":164,"line":483},[162,1821,613],{"class":179},[162,1823,616],{"class":183},[162,1825,192],{"class":179},[162,1827,1828,1830,1832,1834,1836],{"class":164,"line":621},[162,1829,624],{"class":179},[162,1831,59],{"class":183},[162,1833,629],{"class":179},[162,1835,59],{"class":183},[162,1837,192],{"class":179},[162,1839,1840,1842,1844,1846,1848,1850,1852],{"class":164,"line":636},[162,1841,624],{"class":179},[162,1843,641],{"class":183},[162,1845,645],{"class":644},[162,1847,547],{"class":168},[162,1849,650],{"class":179},[162,1851,641],{"class":183},[162,1853,192],{"class":179},[162,1855,1856,1858,1860],{"class":164,"line":657},[162,1857,660],{"class":179},[162,1859,616],{"class":183},[162,1861,192],{"class":179},[162,1863,1864],{"class":164,"line":667},[162,1865,670],{"class":279},[162,1867,1868],{"class":164,"line":673},[162,1869,322],{"class":279},[251,1871,679],{"id":678},[59,1873,682],{},[152,1875,1876],{"className":154,"code":685,"language":156,"meta":157,"style":157},[159,1877,1878,1894,1904,1914,1934,1960,1964,1968,1974,1992,2014,2018,2022,2026,2032,2038,2046,2068,2090,2098,2102,2106],{"__ignoreMap":157},[162,1879,1880,1882,1884,1886,1888,1890,1892],{"class":164,"line":165},[162,1881,377],{"class":168},[162,1883,512],{"class":273},[162,1885,397],{"class":396},[162,1887,401],{"class":400},[162,1889,95],{"class":279},[162,1891,406],{"class":273},[162,1893,293],{"class":279},[162,1895,1896,1898,1900,1902],{"class":164,"line":296},[162,1897,413],{"class":168},[162,1899,338],{"class":279},[162,1901,284],{"class":283},[162,1903,343],{"class":279},[162,1905,1906,1908,1910,1912],{"class":164,"line":319},[162,1907,425],{"class":424},[162,1909,338],{"class":279},[162,1911,284],{"class":179},[162,1913,432],{"class":279},[162,1915,1916,1918,1920,1922,1924,1926,1928,1930,1932],{"class":164,"line":325},[162,1917,728],{"class":424},[162,1919,95],{"class":279},[162,1921,733],{"class":179},[162,1923,176],{"class":168},[162,1925,738],{"class":279},[162,1927,742],{"class":741},[162,1929,745],{"class":279},[162,1931,748],{"class":556},[162,1933,751],{"class":279},[162,1935,1936,1938,1940,1942,1944,1946,1948,1950,1952,1954,1956,1958],{"class":164,"line":331},[162,1937,728],{"class":424},[162,1939,95],{"class":279},[162,1941,760],{"class":179},[162,1943,176],{"class":168},[162,1945,765],{"class":424},[162,1947,95],{"class":279},[162,1949,760],{"class":179},[162,1951,95],{"class":279},[162,1953,774],{"class":550},[162,1955,338],{"class":279},[162,1957,381],{"class":424},[162,1959,432],{"class":279},[162,1961,1962],{"class":164,"line":346},[162,1963,437],{"class":279},[162,1965,1966],{"class":164,"line":365},[162,1967,328],{"emptyLinePlaceholder":11},[162,1969,1970,1972],{"class":164,"line":478},[162,1971,793],{"class":273},[162,1973,449],{"class":279},[162,1975,1976,1978,1980,1982,1984,1986,1988,1990],{"class":164,"line":483},[162,1977,728],{"class":424},[162,1979,95],{"class":279},[162,1981,804],{"class":550},[162,1983,807],{"class":279},[162,1985,810],{"class":283},[162,1987,287],{"class":279},[162,1989,290],{"class":168},[162,1991,293],{"class":279},[162,1993,1994,1996,1998,2000,2002,2004,2006,2008,2010,2012],{"class":164,"line":621},[162,1995,821],{"class":299},[162,1997,738],{"class":279},[162,1999,742],{"class":741},[162,2001,745],{"class":279},[162,2003,830],{"class":179},[162,2005,95],{"class":279},[162,2007,535],{"class":179},[162,2009,837],{"class":168},[162,2011,840],{"class":556},[162,2013,751],{"class":279},[162,2015,2016],{"class":164,"line":636},[162,2017,847],{"class":279},[162,2019,2020],{"class":164,"line":657},[162,2021,437],{"class":279},[162,2023,2024],{"class":164,"line":667},[162,2025,328],{"emptyLinePlaceholder":11},[162,2027,2028,2030],{"class":164,"line":673},[162,2029,446],{"class":273},[162,2031,449],{"class":279},[162,2033,2034,2036],{"class":164,"line":864},[162,2035,454],{"class":299},[162,2037,608],{"class":279},[162,2039,2040,2042,2044],{"class":164,"line":871},[162,2041,624],{"class":179},[162,2043,616],{"class":183},[162,2045,192],{"class":179},[162,2047,2048,2050,2052,2054,2056,2058,2060,2062,2064,2066],{"class":164,"line":880},[162,2049,883],{"class":179},[162,2051,59],{"class":183},[162,2053,888],{"class":179},[162,2055,381],{"class":424},[162,2057,95],{"class":279},[162,2059,733],{"class":179},[162,2061,95],{"class":279},[162,2063,899],{"class":179},[162,2065,59],{"class":183},[162,2067,192],{"class":179},[162,2069,2070,2072,2074,2076,2078,2080,2082,2084,2086,2088],{"class":164,"line":906},[162,2071,883],{"class":179},[162,2073,641],{"class":183},[162,2075,645],{"class":644},[162,2077,547],{"class":168},[162,2079,917],{"class":179},[162,2081,381],{"class":424},[162,2083,95],{"class":279},[162,2085,924],{"class":179},[162,2087,641],{"class":183},[162,2089,192],{"class":179},[162,2091,2092,2094,2096],{"class":164,"line":931},[162,2093,934],{"class":179},[162,2095,616],{"class":183},[162,2097,192],{"class":179},[162,2099,2100],{"class":164,"line":941},[162,2101,944],{"class":279},[162,2103,2104],{"class":164,"line":947},[162,2105,437],{"class":279},[162,2107,2108],{"class":164,"line":952},[162,2109,322],{"class":279},[63,2111,958],{"id":957},[59,2113,961,2114,967],{},[70,2115,966],{"href":964,"rel":2116},[74],[969,2118,2119,2127],{},[972,2120,2121],{},[975,2122,2123,2125],{},[978,2124,980],{},[978,2126,984],{"align":983},[986,2128,2129,2135,2141],{},[975,2130,2131,2133],{},[991,2132,993],{},[991,2134,996],{"align":983},[975,2136,2137,2139],{},[991,2138,1001],{},[991,2140,1004],{"align":983},[975,2142,2143,2145],{},[991,2144,1009],{},[991,2146,1012],{"align":983},[63,2148,1016],{"id":1015},[59,2150,1019],{},[59,2152,961,2153,1027],{},[70,2154,1026],{"href":1024,"rel":2155},[74],[59,2157,1030],{},[63,2159,1034],{"id":1033},[59,2161,1037],{},[59,2163,1040],{},[59,2165,2166,95],{},[70,2167,1047],{"href":1045,"rel":2168},[74],[63,2170,1051],{"id":1050},[59,2172,1054],{},[59,2174,1057],{},[59,2176,1060],{},[59,2178,2179,1068],{},[70,2180,1067],{"href":1065,"rel":2181},[74],[63,2183,1072],{"id":1071},[59,2185,1075],{},[59,2187,1078],{},[63,2189,1082],{"id":1081},[59,2191,1085],{},[85,2193,2194,2198,2202],{},[88,2195,2196,1093],{},[159,2197,1092],{},[88,2199,2200,1099],{},[159,2201,1098],{},[88,2203,2204,1105],{},[159,2205,1104],{},[59,2207,1108,2208,1114,2211,1120],{},[70,2209,1113],{"href":1111,"rel":2210},[74],[70,2212,1119],{"href":1117,"rel":2213},[74],[59,2215,1123,2216,1127,2218,538,2220,1134,2222,95],{},[159,2217,1126],{},[159,2219,1130],{},[159,2221,1133],{},[159,2223,1137],{},[63,2225,1141],{"id":1140},[85,2227,2228,2237,2242,2247],{},[88,2229,1146,2230,1152,2233,1156,2235,1160],{},[70,2231,1151],{"href":1149,"rel":2232},[74],[159,2234,1155],{},[159,2236,1159],{},[88,2238,1146,2239,1168],{},[70,2240,1167],{"href":1165,"rel":2241},[74],[88,2243,1171,2244,1177],{},[70,2245,1176],{"href":1174,"rel":2246},[74],[88,2248,1180,2249,1186],{},[70,2250,1185],{"href":1183,"rel":2251},[74],[63,2253,1190],{"id":1189},[59,2255,1193],{},[59,2257,1196],{},[59,2259,1199,2260,1205,2263,1211],{},[70,2261,1204],{"href":1202,"rel":2262},[74],[70,2264,1210],{"href":1208,"rel":2265},[74],[63,2267,1215],{"id":1214},[59,2269,1218,2270,1224],{},[70,2271,1223],{"href":1221,"rel":2272},[74],[59,2274,1227],{},[152,2276,2277],{"className":154,"code":1230,"language":156,"meta":157,"style":157},[159,2278,2279],{"__ignoreMap":157},[162,2280,2281,2283,2285,2287,2289,2291,2293],{"class":164,"line":165},[162,2282,169],{"class":168},[162,2284,1239],{"class":172},[162,2286,176],{"class":168},[162,2288,1244],{"class":550},[162,2290,338],{"class":279},[162,2292,1249],{"class":179},[162,2294,432],{"class":279},[59,2296,1254],{},[63,2298,1258],{"id":1257},[59,2300,1261],{},[59,2302,2303,1269],{},[70,2304,1268],{"href":1266,"rel":2305},[74],[63,2307,1273],{"id":1272},[59,2309,1276],{},[85,2311,2312,2314,2316,2318],{},[88,2313,1281],{},[88,2315,1284],{},[88,2317,1287],{},[88,2319,1290,2320,1293],{},[159,2321,381],{},[59,2323,2324],{},[70,2325,1047],{"href":1298,"rel":2326},[74],[63,2328,1303],{"id":1302},[59,2330,961,2331,1311],{},[70,2332,1310],{"href":1308,"rel":2333},[74],[63,2335,1315],{"id":1314},[59,2337,2338,1323,2341,1327],{},[70,2339,1322],{"href":1320,"rel":2340},[74],[159,2342,1326],{},[63,2344,1331],{"id":1330},[59,2346,1218,2347,1339,2350,1343],{},[70,2348,1338],{"href":1336,"rel":2349},[74],[159,2351,1342],{},[59,2353,1346],{},[59,2355,1349],{},[63,2357,1353],{"id":1352},[59,2359,1356],{},[59,2361,1359,2362,1365],{},[70,2363,1364],{"href":1362,"rel":2364},[74],[59,2366,1368,2367,95],{},[70,2368,1373],{"href":1371,"rel":2369},[74],[1375,2371,1377],{},{"title":157,"searchDepth":296,"depth":296,"links":2373},[2374,2375,2376,2377,2378,2379,2383,2384,2385,2386,2387,2388,2389,2390,2391,2392,2393,2394,2395,2396,2397],{"id":65,"depth":296,"text":66},{"id":82,"depth":296,"text":83},{"id":113,"depth":296,"text":114},{"id":128,"depth":296,"text":129},{"id":195,"depth":296,"text":196},{"id":232,"depth":296,"text":233,"children":2380},[2381,2382],{"id":248,"depth":319,"text":249},{"id":488,"depth":319,"text":489},{"id":957,"depth":296,"text":958},{"id":1015,"depth":296,"text":1016},{"id":1033,"depth":296,"text":1034},{"id":1050,"depth":296,"text":1051},{"id":1071,"depth":296,"text":1072},{"id":1081,"depth":296,"text":1082},{"id":1140,"depth":296,"text":1141},{"id":1189,"depth":296,"text":1190},{"id":1214,"depth":296,"text":1215},{"id":1257,"depth":296,"text":1258},{"id":1272,"depth":296,"text":1273},{"id":1302,"depth":296,"text":1303},{"id":1314,"depth":296,"text":1315},{"id":1330,"depth":296,"text":1331},{"id":1352,"depth":296,"text":1353},{"categories":2399,"date":1410,"readingTime":2400},[1405,1406,1407,1408],{"text":1416,"minutes":1417,"time":1418,"words":1419},{"title":54,"description":61},{"loc":1414,"lastmod":1410},"LBJKb-Nqp7DJd6bm4CzeXlO88BRQKZ1IYitZPWXUbPk",[2405,2409],{"title":2406,"path":2407,"stem":2408,"children":-1},"Use Git Bisect to Find the Commit That Introduced a Bug","\u002Fblog\u002Fuse-git-bisect-to-find-the-commit-that-introduced-a-bug","blog\u002Fuse-git-bisect-to-find-the-commit-that-introduced-a-bug\u002Findex",{"title":2410,"path":2411,"stem":2412,"children":-1},"How to Use Environment Variables to Store Secrets in AWS Amplify Backend","\u002Fblog\u002Fhow-to-use-environment-variables-to-store-secrets-in-aws-amplify-backend","blog\u002Fhow-to-use-environment-variables-to-store-secrets-in-aws-amplify-backend\u002Findex",[2414,2419,2424,2429],{"cover":2415,"date":2416,"slug":2417,"title":2418,"to":2417},"blog\u002Fdebug-why-react-re-renders-a-component\u002Fcover_k8vlif.jpg","2021-02-26","\u002Fblog\u002Fdebug-why-react-re-renders-a-component","Debug Why React (Re-)Renders a Component",{"cover":2420,"date":2421,"slug":2422,"title":2423,"to":2422},"blog\u002Fmy-top-vue-js-interview-questions\u002Fcover_pqpvfe.jpg","2021-10-04","\u002Fblog\u002Fmy-top-vue-js-interview-questions","My Top Vue.js Interview Questions",{"cover":2425,"date":2426,"slug":2427,"title":2428,"to":2427},"blog\u002Fthe-10-favorite-features-of-my-developer-portfolio-website\u002Fcover_ayemj0.jpg","2022-01-07","\u002Fblog\u002Fthe-10-favorite-features-of-my-developer-portfolio-website","The 10 Favorite Features of My Developer Portfolio Website",{"cover":2430,"date":2431,"slug":2432,"title":2433,"to":2432},"blog\u002Ftrack-twitter-follower-growth-over-time-using-an-serverless-node-js-api-on-aws-amplify\u002Fcover_cb2vvh.jpg","2021-09-13","\u002Fblog\u002Ftrack-twitter-follower-growth-over-time-using-an-serverless-node-js-api-on-aws-amplify","Track Twitter Follower Growth Over Time Using A Serverless Node.js API on AWS Amplify"]