Skip to content

innoq/offline-with-redux

main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
src
 
 
 
 
 
 
 
 
 
 

Offline with Redux

This project shows a sample implementation for an Angular project that supports offline operations without using a service worker. Instead it uses Redux to avoid splitting business logic into separate layers when handling no network connectivity. You can find the rationale and explanation in this article.

Running it locally

  • Install dependencies by running npm install
  • Start the dev server by running npm start
  • Navigate to http://localhost:4200/ to see the running application
  • To simulate no network connectivity use the dev tools of your browser to switch off connectivity

Back End

By default this implementation uses typicode's JSON API for tasks as a dependency. Therefore any changes you make are non-permanent and can't really be refetched. You can of course provide your own back-end implementation that provides a simple REST CRUD interface for tasks.

About

Sample code for an angular application that supports offline operations without a service worker

Resources

Stars

Watchers

Forks