vercel / vercel/next-learn

Chapter 15: TypeError: (0 , react__WEBPACK_IMPORTED_MODULE_3__.useActionState) is not a function or its return value is not iterable

Open
#765 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
4.8k
Forks
2.2k
PR merge metrics
No merged PRs in 30d

Description

Hello! One cannot proceed with the instructions as is in Chapter 15 (https://nextjs.org/learn/dashboard-app/adding-authentication).

In this chapter, we add export default function LoginForm() to the login-form.tsx file, as shown here: https://github.com/vercel/next-learn/blob/main/dashboard/final-example/app/ui/login-form.tsx#L14

However, the compiler is upset with TypeError: (0 , react__WEBPACK_IMPORTED_MODULE_3__.useActionState) is not a function or its return value is not iterable.

Screen Shot 2024-06-24 at 3 59 20 PM

In case I missed anything, here's my code as well: https://github.com/beckrecca/pReactice/blob/main/app/ui/login-form.tsx

I haven't been able to find report of a similar error. Is there any workaround?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the Chapter 15 authentication steps and inspect app/ui/login-form.tsx alongside the linked final-example version. Check the project’s React and Next.js setup around useActionState and compare it with the reported error. Done means the chapter works as written, or the instructions clearly document the required fix or workaround.

Written by the indexing model from the issue text.

Assessment

Tech stack
next.js, react, typescript
Domain
documentation, frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.