APAditya Prabhatinadityaprabhat.hashnode.dev·Apr 24, 2022 · 12 min readReact Fiber, Reconciliation and Virtual DOMVirtual DOM React components are created using JSX, but the browser has no clue what it is. Browsers only understand plain JavaScript, so somehow JSX will have to be transformed into it. Consider this JSX that is returned from a component. return (...01K
APAditya Prabhatinadityaprabhat.hashnode.dev·Mar 24, 2022 · 1 min readUsing setTimeout over setIntervalWhat if you need a function that makes an ajax request repeatedly after a specific time interval? What would you do? Writing a setInterval(callback, delay) would seem to be the ideal way, right? But there’s a problem. function serverFetch() { setTi...00
APAditya Prabhatinadityaprabhat.hashnode.dev·Mar 13, 2022 · 7 min readEvent Loop and asynchrony in JavaScriptThe below image is a very simplified view of the JS engine. It has two components: Memory heap – This is where memory allocation takes place. Call Stack – It’s a stack that keeps track of the function in the script that’s currently executing and ...00
APAditya Prabhatinadityaprabhat.hashnode.dev·Mar 6, 2022 · 4 min readCallbacks in JavaScriptWhat is a callback function A callback function is a function that is passed as an argument into another function and invoked by the outer function either synchronously or asynchronously. Need of callback function JavaScript is a single-threaded lang...00
APAditya Prabhatinadityaprabhat.hashnode.dev·May 30, 2021 · 7 min readRouting in Single Page ApplicationWhat the heck is Single Page Application aka SPA ? One of the most fundamental operations on the web is clicking on a link. The click can result in one of the following: Open a new tab. Reload the current page to render new content fetched from the ...00