Skip to content

Prefetch multiple links at once with Next.js

Notifications You must be signed in to change notification settings

lalit2005/use-link-prefetch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

image

use-prefetch-link

A highly simple library that fetches multiple links at once.

To be used with Next.js only

NPM Downloads JavaScript Style Guide Size without zipping License Types included

Installation

npm i use-prefetch-link
yarn add use-prefetch-link

Usage 📖

import { usePrefetch } from 'use-link-prefetch'

const Page = () => {

  const router = usePrefetch(['/dashboard', '/support'])

  return (
    <div>
      Hello world
    </div>
  )
}

export default Page