Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: set
useFetch
delay to 0 by default (#362)
- Loading branch information
Showing
4 changed files
with
54 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<template> | ||
<main> | ||
TTFB: {{ ttfb }}ms | ||
</main> | ||
</template> | ||
|
||
<script> | ||
import { | ||
defineComponent, | ||
ref, | ||
computed, | ||
useFetch, | ||
onMounted | ||
} from '@nuxtjs/composition-api' | ||
import ChildComp from '../components/comp.vue' | ||
import { fetcher } from '../utils' | ||
export default defineComponent({ | ||
setup() { | ||
useFetch(() => {}) | ||
const ttfb = ref(-1) | ||
onMounted(() => { | ||
ttfb.value = globalThis.performance.getEntriesByType('navigation')[0].responseStart | ||
}) | ||
return { | ||
ttfb | ||
} | ||
}, | ||
}) | ||
</script> |
33b9790
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs: