Skip to content

Commit 23097c3

Browse files
committed
update
1 parent e0a3792 commit 23097c3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/guide/reusability/composables.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -216,19 +216,19 @@ export function useFetch(url) {
216216
const data = ref(null)
217217
const error = ref(null)
218218
219-
const fetchData = (dt) => {
219+
const fetchData = () => {
220220
// reset state before fetching..
221221
data.value = null
222222
error.value = null
223223
224-
fetch(toValue(dt))
224+
fetch(toValue(url))
225225
.then((res) => res.json())
226226
.then((json) => (data.value = json))
227227
.catch((err) => (error.value = err))
228228
}
229229
230230
watchEffect(() => {
231-
fetchData(url)
231+
fetchData()
232232
})
233233
234234
return { data, error }

0 commit comments

Comments
 (0)