Skip to content

How is prevState used? #6

@tyteen4a03

Description

@tyteen4a03

In your video, on this line the action takes in a prevState variable https://github.com/ProNextJS/forms-management-yt/blob/main/forms-mgmt-finished/src/app/formSubmit.ts#L11

This was not clarified, and the form's defaultValues actually comes from this line: https://github.com/ProNextJS/forms-management-yt/blob/main/forms-mgmt-finished/src/app/MailForm.tsx#L30

Do we actually need this field? If so, how exactly is it used?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions