{"resource":{"title":"Re-rendering vs Unmount in React","isPremium":true,"requires":["premium.general"],"content":{"type":1,"body":"Let us analyse a simple code snippet and see what we can learn from it.\r\n\r\n## The Problem\r\n\r\n```jsx\r\nfunction Parent() {\r\n  const [count, setCount] = useState(0);\r\n\r\n  return (\r\n    <div>\r\n      <button onClick={() => setCount(prev => prev + 1)}>\r\n        Toggle Child\r\n      </button>\r\n      {count ...","isInternal":true},"isActive":true,"stats":{"views":33,"used":0,"likes":0},"published":true,"author":{"id":"3eh0kijZwMrHum8TkMqX","name":"Devtools Tech","username":"devtoolstech"},"resourceId":"JUT1eFkORr5oUDT2lXtc","slug":"re-rendering-vs-unmount-in-react---rid---JUT1eFkORr5oUDT2lXtc","createdAt":1764662370717,"showPaywall":true,"needsUpgrade":false},"currentUser":null,"isOwner":false,"recommendations":{"questions":[{"_id":"5ed0f91d3d4a7a0e4cdee88b","content":{"languages":["javascript"],"difficulty":2},"tags":["javascript"],"slug":"what-will-be-the-output-for-the-following---qid---XVymBb3lyaKDuXiSK6qH","title":"What will be the output for the following?","questionId":"XVymBb3lyaKDuXiSK6qH"},{"_id":"5ec0e5f65b57cb40dd43fa22","content":{"languages":["javascript"],"difficulty":1},"tags":["javascript"],"slug":"what-is-the-output-of-the-following-code---qid---L8tDGiiqFKc1qim91nTj","title":"What is the output of the following code?","questionId":"L8tDGiiqFKc1qim91nTj"},{"_id":"670393307a51681d74806570","content":{"languages":["react"],"difficulty":3},"tags":["javascript","react","ui","ux","circle","uber","frontend interview question","devtools tech","tutorial","frontend challenges","coding challenge","blog","tutorial"],"slug":"how-to-detect-overlapping-circles-in-react-js-uber-frontend-interview-question---qid---ixSxPTedmz1CyVZSab1N","title":"How to detect overlapping circles in React.js? Uber Frontend Interview Question","questionId":"ixSxPTedmz1CyVZSab1N"},{"_id":"5f521c836d3cda64e470c3eb","content":{"difficulty":4,"languages":"javascript"},"tags":["javascript","prototype","frontend fundamentals","prototype chain"],"slug":"what-would-be-the-output-different-ways-of-prototype-calls---qid---oRjYJXGzxi50NhQNWZ8g","title":"What would be the output? (Different ways of Prototype calls)","questionId":"oRjYJXGzxi50NhQNWZ8g"},{"_id":"6908ce763177c39e8559f7c9","content":{"languages":["react","html"],"difficulty":1},"tags":["javascript","ui","ux","infinite scroll","dom","virtual dom","disney hotstar","programming question"],"slug":"infinite-scroll-pagination---qid---FZH2HcNLF3zUMqxmlNMW","title":"Infinite Scroll Pagination","questionId":"FZH2HcNLF3zUMqxmlNMW"}],"resources":[{"_id":"6a12f6954b3e6d922c54a4bb","content":{"difficulty":1,"domain":1,"type":1,"isInternal":true,"languages":[]},"tags":["javascript","ui","ux","devtools tech","prioritising critical images","web performance"],"slug":"prioritising-critical-images---rid---BlV5X4YylAW61dYwFmyG","title":"Prioritising Critical Images","resourceId":"BlV5X4YylAW61dYwFmyG"},{"_id":"69824d07895fc3bf013b40e2","content":{"difficulty":4,"domain":1,"type":1,"isInternal":true,"languages":[]},"tags":["javascript","ui","ux","blog","best practices","code","devtools tech","article"],"slug":"best-code-practices-for-real-world-applications-part-1---rid---8ohjaCmxsxK093sIQad6","title":"Best Code Practices for Real-World Applications - Part 1","resourceId":"8ohjaCmxsxK093sIQad6"},{"_id":"620a50051641361c7c65bd61","content":{"difficulty":4,"domain":2,"type":1,"isInternal":true},"tags":[""],"slug":"how-to-fix-errors-like-referenceerror-window-is-not-defined-in-remix-powered-web-app-or-javascript-frameworks---rid---G0OTehUXo6QQCrfykSF3","title":"How to fix errors like ReferenceError Window is Not Defined in Remix Powered Web App | JavaScript Frameworks","resourceId":"G0OTehUXo6QQCrfykSF3"},{"_id":"690cd2dee48888ea5a7e7ba5","content":{"difficulty":1,"domain":2,"type":1,"isInternal":true,"languages":[]},"tags":["javascript","amazon","frontend","interview experience","ui","ux","tutorial","blog"],"slug":"amazon-frontend-engineer-interview-experience-and-tips---rid---A41fCaZ2TeZcvjo6ua5p","title":"Amazon Frontend Engineer Interview Experience & Tips","resourceId":"A41fCaZ2TeZcvjo6ua5p"},{"_id":"5f1ff867cbec5f7ffc0c2fb6","content":{"difficulty":2,"domain":2,"type":1},"tags":["javascript","frontend","reactjs","profiling","performance","chrome","devtools","advanced frontend"],"slug":"profiling-react-performance-with-react-16-and-chrome-devtools---rid---Oj6vkw9ga5NIqw4266kr","title":"Profiling React performance with React 16 and Chrome Devtools.","resourceId":"Oj6vkw9ga5NIqw4266kr"}]}}