Skip to content

[Omission]: useOptimistic is documented as having a required second parameter  #7098

Open
@denis-sokolov

Description

@denis-sokolov

Summary

useOptimistic’s second parameter is allegedly optional (source), but the docs imply that it is required.

Page

https://react.dev/reference/react/useOptimistic#parameters

Details

Perhaps in the Reference section, Parameters, under updateFn, it could be mentioned that the function is optional, and that the returned function addOptimistic will instead be a setter (setOptimistic).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions