Skip to content

fix: Update docs to useFormStatus for pending#69163

Closed
timodwhit wants to merge 1 commit intovercel:canaryfrom
timodwhit:patch-2
Closed

fix: Update docs to useFormStatus for pending#69163
timodwhit wants to merge 1 commit intovercel:canaryfrom
timodwhit:patch-2

Conversation

@timodwhit
Copy link

The third parameter seems to have been removed from useActionState() and requires useFormStatus

The third parameter seems to have been removed from useActionState() and requires useFormStatus
@ijjk ijjk added the Documentation Related to Next.js' official documentation. label Aug 21, 2024
@ijjk
Copy link
Member

ijjk commented Aug 21, 2024

Allow CI Workflow Run

  • approve CI run for commit: fc0456f

Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer

Copy link
Member

@eps1lon eps1lon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The third parameter seems to have been removed from useActionState()

It is still there. If you're not seeing it, confirm you're on the latest React/Next.js Canary. If you're still not seeing it, please file a bug report.

The current docs describe the desired state and should remain

@eps1lon eps1lon closed this Aug 22, 2024
@timodwhit
Copy link
Author

According to the react 19 docs: https://19.react.dev/reference/react/useActionState#useactionstate

Returns

useActionState returns an array with exactly two values:

The current state. During the first render, it will match the initialState you have passed. After the action is invoked, it will match the value returned by the action.
A new action that you can pass as the action prop to your form component or formAction prop to any button component within the form.

Unless, it is somewhere else or do those docs need the PR?

@eps1lon
Copy link
Member

eps1lon commented Aug 22, 2024

react.dev needs a PR

@github-actions github-actions bot added the locked label Sep 6, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Documentation Related to Next.js' official documentation. locked

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants