yoshuawuyts / choo-persist Goto Github PK
View Code? Open in Web Editor NEWSynchronize choo state with indexedDB
License: MIT License
Synchronize choo state with indexedDB
License: MIT License
Perhaps upgrading DB versions using semver that's pulled in through brfs
? idk how idb works haha
Hi!
The repo description talks about indexedDB, but when I use choo-persist everything ends up in a big localStorage item.
Is there an option that I need to pass to choo-persist to say 'use indexedDB' or WebSQL etc, or even 'use localForage', rather than localStorage?
This is like a feature request. Right now, this plugin allow a fast first load from indexDB, cool. But what happens when the connections is lost, and the app attemp to make an http request. It would be awesome to allow to the user to keep using the app, and save all changes to local db, and once the connection is availaible again, repost all the state to keep data synced.
Well, the thing is that I'm actually facing this problem right now, I'm writing a pwa with choo here and is working for now, but when I go offline, I have a fast first load, thanks to sw and idb, but can go any other place in the app because of xhr calls failling.
I think this could be done using choo hooks. If there is a call for the onError
hook due to xhr failing, save those changes only in the db, maybe an special collection only for offline diffs. Then on every state change, check if that special collection has data, in that case POST that data to sync the remote db, and clear that collection.
Well that sounds simple but I know is not haha. I wanna hear your opinion about it. Does it make sense? Do you have any better idea?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.