Skip to content

Commit

Permalink
Fix missing function keyword (#6527)
Browse files Browse the repository at this point in the history
* Update use-server.md

* revert export default
  • Loading branch information
AhmedBaset authored and neighborhood999 committed Jan 17, 2024
1 parent 23642a4 commit b2c554e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/content/reference/react/use-server.md
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down Expand Up @@ -208,7 +208,7 @@ function LikeButton() {
'use server';

let likeCount = 0;
export default async incrementLike() {
export default async function incrementLike() {
likeCount++;
return likeCount;
}
Expand Down

0 comments on commit b2c554e

Please sign in to comment.