Skip to content

Commit 4b36b02

Browse files
committed
refactor(project): update from useDownload to useDownloader
1 parent 788c819 commit 4b36b02

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ npm install --save react-use-downloader
3939

4040
```jsx
4141
import React from "react";
42-
import useDownload from "react-use-downloader";
42+
import useDownloader from "react-use-downloader";
4343

4444
export default function App() {
4545
const {
@@ -50,7 +50,7 @@ export default function App() {
5050
cancel,
5151
error,
5252
isInProgress
53-
} = useDownload();
53+
} = useDownloader();
5454

5555
const fileUrl = "https://olavoparno.github.io/saywololo/sounds/Wololo1.wav";
5656

@@ -81,7 +81,7 @@ export default function App() {
8181

8282
## Documentation
8383

84-
`useDownload()` returns:
84+
`useDownloader()` returns:
8585

8686
- An object with the following keys:
8787

@@ -103,7 +103,7 @@ const {
103103
cancel,
104104
error,
105105
isInProgress
106-
} = useDownload();
106+
} = useDownloader();
107107
```
108108

109109
---

src/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { useCallback, useMemo, useRef, useState } from 'react';
22
import { resolver } from './fetch-progress';
33
import jsDownload from './js-download';
44

5-
function useDownload() {
5+
function useDownloader() {
66
const debugMode = process.env.REACT_APP_DEBUG_MODE;
77

88
const [elapsed, setElapsed] = useState(0);
@@ -133,4 +133,4 @@ function useDownload() {
133133
);
134134
}
135135

136-
export default useDownload;
136+
export default useDownloader;

0 commit comments

Comments
 (0)