• LINKS

  • Why html Id attribute is unique, what’s the purpose of it and how it is different from class.

  • Difference between debouncing and throttling, and when to use which also how it helps in UX.

  • Difference between even bubbling and event capturing, and how event propagates in DOM tree.

  • What is closure.

  • How scoping works in JavaScript variables and what is lexical scoping.

  • Write a custom polyfill for forEach method.

  • How event loop work, difference between task queue, micro task queue and how web APIs and promises get executed.

  • How to use AbortHandler web API to remove event listener from element.

  • Difference between DOM and vDOM/ shadow DOM.

  • Component Lifecycle in context of useEffect.

  • Three phases of react’s components lifecycle

    //What’s the correct order of these console.log statements in the console
    function Parent({ children }) {
      console.log("Parent is rendered");
      useEffect(() => {
        console.log("Parent committed effect");
      }, []);
    
      return <div>{children}</div>;
    }
    
    function Child() {
      console.log("Child is rendered");
      useEffect(() => {
        console.log("Child committed effect");
      }, []);
    
      return <p>Child</p>;
    }
    
    export default function App() {
      return (
        <Parent>
          <Child />
        </Parent>
      );
    }
    
  • How contextAPI differs from other store management library.

  • Difference between ref and useState.

  • How to optimize react code → https://gist.github.com/dariuscosden/7c2b1347a4196e7f04ed412cec99ec97

  • Significance of key prop in react and how it helps in rendering and state update.

  • What is hydration.

  • How nextjs rendering work.

  • How Suspense helps in streaming content.