Closed gr2m closed 7 years ago
Is this a WIP? Judging by your last commit? If so please pop WIP on the PR body else I might accidentally merge it!
yes, sorry, done!
🛎 ping @hoodiehq/maintainers this PR is ready for review 👀
I know it looks like huge, but most of the changes are about wrapping logic into state.ready.then(function () { ... })
part of hoodiehq/camp#101
Features
connectionStatus.ready
returns a promise that resolves once the last state was loaded from storenew ConnectionStatus(options)
now acceptsoptions.store
which can be a custom API with asyncget,set,unset
methodsBreaking changes
connectionStatus.isChecking
is now a property (as described in README). It was implemented as function beforeconnectionStatus.ok
does not return false if a connection error was persisted before untilconnectionStatus.ready
resolvednew ConnectionStatus(options)
:options.cache.timeout
is nowoptions.cacheTimeout