From 0a2b01fbc470789eeb88818a8d3fd571d7cc41c6 Mon Sep 17 00:00:00 2001 From: Alex Liu Date: Tue, 14 Jan 2025 22:36:09 +0800 Subject: [PATCH] docs: update examples to use function declarations for clarity (#30588) --- docs/3.api/2.composables/use-nuxt-data.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/3.api/2.composables/use-nuxt-data.md b/docs/3.api/2.composables/use-nuxt-data.md index a88c010715..fc77d5b875 100644 --- a/docs/3.api/2.composables/use-nuxt-data.md +++ b/docs/3.api/2.composables/use-nuxt-data.md @@ -77,7 +77,7 @@ let previousTodos = [] // Access to the cached value of useAsyncData in todos.vue const { data: todos } = useNuxtData('todos') -const addTodo = async () => { +async function addTodo () { return $fetch('/api/addTodo', { method: 'post', body: {