Skip to content

Maintaining complete form state after unmount  #992

Open
@made-in-nz

Description

@made-in-nz

Are you submitting a bug report or a feature request?

Feature request

What is the current behavior?

I'm migrating our front-end infrastructure from redux-form, where we have projects with multiple forms with destroyOnUnmount={false} set on the (redux-form) Form.
In my apps we have wizard type processes, and other CRUD type apps where a record is displayed across multiple tabs with a form used on each tab. To easily visualise a page/tab's validation state I find it convenient to have distinct forms for each.
In redux-form, the complete form state persists in the redux store when destroyOnUnmount={false} is set, which means when remounting the form component the complete state is rehydrated (visited, touched, error, etc).

Wondering what is the approach to achieve this using react-final-form?

What's your environment?

"final-form": "^4.20.7",
"react": "^18.1.0",  
"react-dom": "^18.1.0",
"react-final-form": "^6.5.9",

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