Best of React Hooks โ€” May 2023

  1. 1
    Article
    Avatar of communityCommunity Picksยท3y

    How to Fix Memory Leaks in React

    Learn about the primary causes of memory leaks in React and how to fix them using different methods.

  2. 2
    Article
    Avatar of builderiobuilder.ioยท3y

    How to Test Custom React Hooks with React Testing Library

    Custom React hooks offer developers the ability to extract and reuse common functionality across multiple components. Testing these hooks can be tricky, especially if you are new to testing. In this blog post, we will explore how to test a custom React hook using React Testing Library.

  3. 3
    Article
    Avatar of medium_jsMediumยท3y

    useRef vs. useState in React

    Understanding the differences between useRef and useState hooks in React and knowing when to use each hook is crucial for writing effective and optimized React components. useRef is primarily used to access and manipulate the DOM or store mutable values without triggering re-renders. useState is used for managing component state, triggering re-renders when the state updates.

  4. 4
    Article
    Avatar of medium_jsMediumยท3y

    Memoize or Callback? A Comprehensive Guide to Using useMemo and useCallback in React

    A comprehensive guide to using useMemo and useCallback in React for optimizing performance by preventing unnecessary re-renders of components.

  5. 5
    Article
    Avatar of communityCommunity Picksยท3y

    Custom Tooltip Directive in Vuejs 3: Tutorial

    The most important forms for code reuse in Vuejs are components and composable if you write components with composition API. Mixins, directives, and plugins can further improve your code's maintainability and reusability. Plugins, on the other hand, are packages that can be installed and used across multiple components in your application.

  6. 6
    Article
    Avatar of hnHacker Newsยท3y

    vadimdemedes/ink: ๐ŸŒˆ React for interactive command-line apps

    Ink provides the same component-based UI building experience that React offers in the browser. Ink uses Yoga to build Flexbox layouts in the terminal, so most CSS-like props are available in Ink. If you're looking for docs on Ink 3, check out this release.