Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

feat(nuxt3): useFetch with dynamic reactive request #3731

Merged
merged 4 commits into from
Mar 17, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
always use $f_ prefix for useFetch payload keys
  • Loading branch information
pi0 committed Mar 17, 2022
commit 415d33e0fd2f2b4091f43241ba1e2822b13608e7
2 changes: 1 addition & 1 deletion packages/nuxt3/src/app/composables/fetch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export function useFetch<
request: Ref<ReqT> | ReqT | (() => ReqT),
opts: UseFetchOptions<_ResT, Transform, PickKeys> = {}
) {
const key = opts.key || '_f' + hash([request, opts])
const key = '$f_' + (opts.key || hash([request, opts]))
const _request = computed<FetchRequest>(() => {
let r = request
if (typeof r === 'function') {
Expand Down