All Projects → YerkoPalma → choo-offline

YerkoPalma / choo-offline

Licence: MIT license
🔧 offline first support for choo apps

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to choo-offline

ionic-resource-generator
Painless, Offline First, No Dependency, Ionic resources generator
Stars: ✭ 31 (+158.33%)
Mutual labels:  offline
Smart-Text-Editor
The text editor that requires only a browser and a keyboard!
Stars: ✭ 60 (+400%)
Mutual labels:  offline
progressive
This is the repository for my course, Building a Progressive Web App on LinkedIn Learning and Lynda.com.
Stars: ✭ 26 (+116.67%)
Mutual labels:  offline
engine
Benefit from new browsers' technologies to speed up your site
Stars: ✭ 39 (+225%)
Mutual labels:  offline
google-chart-offline
google chart offline
Stars: ✭ 25 (+108.33%)
Mutual labels:  offline
generator-sf
Yeoman generator that scaffolds out a Symfony PHP app including Browsersync, various CSS preprocessors, jspm, webpack, browserify and Service Worker
Stars: ✭ 14 (+16.67%)
Mutual labels:  offline
progrssive
A PWA for reading RSS feeds. It works offline!
Stars: ✭ 23 (+91.67%)
Mutual labels:  offline
otp-authenticator-webapp
A 'Google Authenticator' like Single Page Application
Stars: ✭ 69 (+475%)
Mutual labels:  offline
learncpp-download
Scrape bot, to get you an offline copy of tutorials
Stars: ✭ 23 (+91.67%)
Mutual labels:  offline
react-health-check
Lightweight React hook for checking health of API services.
Stars: ✭ 28 (+133.33%)
Mutual labels:  offline
azure-sql-db-sync-api-change-tracking
Using Azure SQL Change Tracking API to Sync mobile Apps data with the Cloud
Stars: ✭ 58 (+383.33%)
Mutual labels:  offline
multiOTPCredentialProvider
multiOTP Credential Provider is a V2 Credential Provider for Windows 7/8/8.1/10/2012(R2)/2016 with options like RDP only and UPN name support
Stars: ✭ 121 (+908.33%)
Mutual labels:  offline
xyTalk-pc
企业IM即时通讯定制平台,百万级高并发、高性能、可扩展、安全、高交互体验的企业通信和协作im平台。包含通讯服务、客户端(PC、Android、iOS)、Web门户(用于集成企业应用)、WebAPI。
Stars: ✭ 48 (+300%)
Mutual labels:  offline
react-relay-appsync
AppSync for Relay
Stars: ✭ 19 (+58.33%)
Mutual labels:  offline
Telegraf-Test
Telegraf Test - Simple Test ToolKit of Telegram Bots
Stars: ✭ 22 (+83.33%)
Mutual labels:  offline
electron-releases
castLabs Electron for Content Security
Stars: ✭ 173 (+1341.67%)
Mutual labels:  offline
angular-http-cache
Speed up your remote requests by automatically caching them on client and add support for offline navigation.
Stars: ✭ 25 (+108.33%)
Mutual labels:  offline
examples-android
Android demo application for GLMap framework
Stars: ✭ 14 (+16.67%)
Mutual labels:  offline
service-workers-offline
Code for the Service Workers / PWA section of the Service Workers & Offline course by Kyle Simpson
Stars: ✭ 99 (+725%)
Mutual labels:  offline
organicmaps
🍃 Organic Maps is a free Android & iOS offline maps app for travelers, tourists, hikers, and cyclists. It uses crowd-sourced OpenStreetMap data and is developed with love by MapsWithMe (MapsMe) founders and our community. No ads, no tracking, no data collection, no crapware. Your donations and positive reviews motivate and inspire our small team!
Stars: ✭ 3,689 (+30641.67%)
Mutual labels:  offline

choo-offline Build Status js-standard-style

offline first support for choo apps

Installation

npm install --save choo-offline

Usage

const choo = require('choo')
const offline = require('choo-offline')

const app = choo()

offline(offline => {
  app.use(offline)

  const tree = app.start()
  document.body.appendChild(tree)
})

API

offline([opts], fn())

Function that wraps the choo start and use methods, only needed for this plugin, other plugins can be registered before. It can take two parameters.

opts

Type: Object

Optional configuration object for the plugin, can take the following options:

  • serviceWorker (String): A string with the relative path to a service worker file, if not provided, it will not install a service worker. Defaults: ''.
  • dbConfig (Object): An object with localforage config.

fn

Type: Function

Required function that get as the only argument, the offline plugin object. The object use the following hooks:

  • onStateChange: To update the app state locally with localforage.

  • onAction: To check if the app is offline and, if it is, use a backup action. Use the backup function when you have actions that depend on network availability, just define a _backup option in your send() data, the _backup option must be a string calling an effect or reducer from your model. For example

       send('xhrEffect', { foo: bar, _backup: 'nonXhrBackup' })

    The above statement will call xhrEffect normally, but when offline, it will call the nonXhrBackup effect|reducer, passing the same data, excluding the _backup strings.

  • wrapInitialState: To get the initial local state.

License

MIT

Crafted with <3 by YerkoPalma .


This package was initially generated with yeoman and the p generator.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].