-
Notifications
You must be signed in to change notification settings - Fork 595
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Choo Offline First #620
Comments
@shotlom heya, good question! So this is a really tricky question, with no good answer. What you're asking for is how to eventually sync up values, and possibly roll back the results. This means doing some form of action that stores values inside IndexedDB until it's ready to be sent. Generally my advice for this would be to not go down that path. Disable input fields if offline, and save yourself the trouble. If that's not an option, however, you can look into "syncable" databases like couchdb/pouchdb, and the newer hyperdb. None of which are going to be small, but that's the cost inherent to the problem. Hope that answers your question! |
Thanks @yoshuawuyts for the response. I'm not sure if you've looked into Gun.js.db. It's an interesting approach inspired by couchdb. As you say, it's not small in size so rubs up against the choo motivation. Enabled input fields is important for some use cases so ... what to do? Perhaps this issue can be a collection point for future options. |
It would good to get your thoughts @yoshuawuyts on Geir's experiments for example with choo and gun. |
@shotlom looks fun! |
Question
Loved the new documentation about Forms, but notice that the pattern uses fetch to POST data and then nothing more.
What is best practice for a choo offline first approach?
I was looking at Gunjs for database sync, however it is a bit green, and a very large library. Kind of an anti-pattern when compared to choo.
The text was updated successfully, but these errors were encountered: