You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Because the componentDidUpdate method uses prevProps instead of this.props, when resetForm is called, it saves the values that existed in the form before resetting. Because of this, I can reset a form, then when I navigate away from it and then back, all the values that were in the form prior to resetting it reappear.
Because the
componentDidUpdate
method usesprevProps
instead ofthis.props
, whenresetForm
is called, it saves the values that existed in the form before resetting. Because of this, I can reset a form, then when I navigate away from it and then back, all the values that were in the form prior to resetting it reappear.formik-persist/src/formik-persist.tsx
Lines 23 to 27 in 63aeb8f
My current workaround is to simply call
resetForm()
twice. The second time,redux-persist
will correctly save the empty formThe text was updated successfully, but these errors were encountered: