Snippets

Here is a collection of code snippets which you may find useful.

  • Next.js SEO component

    A re-useable component to ease the pain of entering SEO meta tags.

  • React.js useDebounce Hook

    A useful React hook for debouncing a string.

  • React.js useIsInViewport Hook

    React hook which reports if an element is in viewport.

  • React.js useMediaQuery Hook

    Custom React.js hook that watches for certain breakpoints.

  • React.js useOnClickOutside Hook

    React hook which listens for clicks outside of a specified element.

  • React.js useOnScreen Hook

    React hook which reports if an element is in screen view.

  • React.js usePagination Hook

    Custom React.js hook used for client-side pagination.

  • Validate an email address with JavaScript RegEx.

    A useful function to determine whether a string is a valid email address or not.