andyrichardson/fielder

Add support for persisting state

Closed this issue · 0 comments

About

Users should have the option to persist and restore form state.

This is useful when persisting the state of the form is required (i.e. localStorage / AsyncStorage).

The only current option of restoring state is with multiple useField or mountField calls (not ideal).

This should not encourage a pattern of setting initial values (i.e. useForm({ initialValues }).

Todo

  • Export state somehow (maybe)
  • Allow restoration of state