client/src/actions/networkActions.js
author ymh <ymh.work@gmail.com>
Fri, 28 Jul 2017 19:40:35 +0200
changeset 129 d48946d164c6
parent 87 dbcee57de2c6
permissions -rw-r--r--
Add a first version of synchronisation Remove redux-offline dependency make the redux state fully immutable TODO: better error management TODO: make syncronization work automatically

import * as types from '../constants/actionTypes';

export const dataFetchSuccess = (res) => {
  return {
    type: types.DATA_FETCH_SUCCESS,
    res
  };
}

export const setOnlineStatus = (status) => {
  return {
    type: status?types.STATUS_ONLINE:types.STATUS_OFFLINE
  }
}


export const forceSync = () => {
  return {
    type: types.SYNC_DO_SYNC
  }
}