Skip to content

Commit cb62fb6

Browse files
authored
feat: update readme
1 parent 49e6a97 commit cb62fb6

File tree

1 file changed

+39
-2
lines changed

1 file changed

+39
-2
lines changed

README.md

Lines changed: 39 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,40 @@
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+
```

0 commit comments

Comments
 (0)