File tree Expand file tree Collapse file tree 1 file changed +39
-2
lines changed Expand file tree Collapse file tree 1 file changed +39
-2
lines changed Original file line number Diff line number Diff line change 1- # Use Link Prefetch
1+ ![ image] ( https://user-images.githubusercontent.com/69138026/149915882-9354c15f-df43-4157-a15f-6737ad32c53a.png )
2+ # use-prefetch-link
23
3- A package that allows you to prefetch multiple links in Next.js.
4+ A highly simple library that fetches multiple links at once.
5+ > To be used with ** Next.js only**
6+
7+ [ ![ NPM] ( https://img.shields.io/npm/v/use-link-prefetch.svg )] ( https://www.npmjs.com/package/use-link-prefetch )
8+ ![ Downloads] ( https://badgen.net/npm/dw/use-link-prefetch )
9+ [ ![ JavaScript Style Guide] ( https://img.shields.io/badge/code_style-standard-brightgreen.svg )] ( https://standardjs.com )
10+ ![ Size without zipping] ( https://badgen.net/bundlephobia/min/use-link-prefetch )
11+ ![ License] ( https://badgen.net/npm/license/use-link-prefetch )
12+ ![ Types included] ( https://badgen.net/npm/types/use-link-prefetch )
13+
14+ ## Installation
15+
16+
17+ ``` bash
18+ npm i use-prefetch-link
19+ ```
20+ ``` bash
21+ yarn add use-prefetch-link
22+ ```
23+ ## Usage 📖
24+
25+ ``` js
26+ import { usePrefetch } from ' use-link-prefetch'
27+
28+ const Page = () => {
29+
30+ const router = usePrefetch ([' /dashboard' , ' /support' ])
31+
32+ return (
33+ < div>
34+ Hello world
35+ < / div>
36+ )
37+ }
38+
39+ export default Page
40+ ```
You can’t perform that action at this time.
0 commit comments