This PR adds an optional confirm property. When set, the form state will be rehydrate or not, depends on what boolean value of confirm function being resolve:
usage:
<Persist
name={formName}
confirm={async () => {
const action = await ResolvableMessageBox({
desc: 'There're unsaved changes since you leave last time, recover?'
})
return action === 'confirm';
}}
/>
This PR adds an optional
confirm
property. When set, the form state will be rehydrate or not, depends on what boolean value of confirm function being resolve: usage: