Confirm posts were successfully sent to the server before emptying the offline posts array in localStorage
NidhiKJha opened this issue · comments
In form.js
formDataArray.map(formData => { postFormData(formData, this.state.token.access_token); }); localStorage.removeItem("Failed Form Submission Data");
Ensure the localStorage is removed only after the data is sent successfully.
Editing for more clarity on what's left here
This is now part of the pull request here #9.
The enhancement is working so far in my local testing.
@all-contributors please add @NidhiKJha for code and doc
I've put up a pull request to add @NidhiKJha! 🎉