There should be an easy way to hook a form's onSubmit to a small library that checks if you are offline and if so, writes the data to localstorage and submits when back online.
Should be really easy to create a custom UI response for the offline use case. Also needs to provide an observable or similar per form to inform the application code when the data gets sent.
There should be an easy way to hook a form's
onSubmit
to a small library that checks if you are offline and if so, writes the data to localstorage and submits when back online.Should be really easy to create a custom UI response for the offline use case. Also needs to provide an observable or similar per form to inform the application code when the data gets sent.
Inspired by https://mxb.at/blog/offline-forms/. See https://developer.mozilla.org/en/docs/Online_and_offline_events.