mirror of
https://github.com/nuxt/nuxt.git
synced 2025-01-31 07:40:33 +00:00
docs: update examples to use function declarations for clarity (#30588)
This commit is contained in:
parent
8ac54ff101
commit
4eb41442b8
@ -77,7 +77,7 @@ let previousTodos = []
|
|||||||
// Access to the cached value of useAsyncData in todos.vue
|
// Access to the cached value of useAsyncData in todos.vue
|
||||||
const { data: todos } = useNuxtData('todos')
|
const { data: todos } = useNuxtData('todos')
|
||||||
|
|
||||||
const addTodo = async () => {
|
async function addTodo () {
|
||||||
return $fetch('/api/addTodo', {
|
return $fetch('/api/addTodo', {
|
||||||
method: 'post',
|
method: 'post',
|
||||||
body: {
|
body: {
|
||||||
|
Loading…
Reference in New Issue
Block a user