From b2c554ec1ce6c6313108421ef1b465a91e17cb64 Mon Sep 17 00:00:00 2001 From: Ahmed Abdelbaset Date: Sat, 6 Jan 2024 01:59:01 +0200 Subject: [PATCH] Fix missing function keyword (#6527) * Update use-server.md * revert export default --- src/content/reference/react/use-server.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/content/reference/react/use-server.md b/src/content/reference/react/use-server.md index 638163369..0d0fc8404 100644 --- a/src/content/reference/react/use-server.md +++ b/src/content/reference/react/use-server.md @@ -153,7 +153,7 @@ export default async function requestUsername(formData) { // UsernameForm.js 'use client'; -import {useFormState} from 'react-dom'; +import { useFormState } from 'react-dom'; import requestUsername from './requestUsername'; function UsernameForm() { @@ -208,7 +208,7 @@ function LikeButton() { 'use server'; let likeCount = 0; -export default async incrementLike() { +export default async function incrementLike() { likeCount++; return likeCount; }