Skip to content

Commit

Permalink
expo can use @react-native-community/async-storage
Browse files Browse the repository at this point in the history
  • Loading branch information
sheppard committed Jul 30, 2020
1 parent 3909a6d commit 7fe15ab
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 206 deletions.
26 changes: 2 additions & 24 deletions packages/outbox/src/offline.js
Original file line number Diff line number Diff line change
@@ -1,29 +1,7 @@
import { createOffline } from '@redux-offline/redux-offline';
import offlineConfig from '@redux-offline/redux-offline/lib/defaults';
import { RESET_STATE } from '@redux-offline/redux-offline/lib/constants';
import { busy } from '@redux-offline/redux-offline/lib/actions';

import detectNetwork from '@redux-offline/redux-offline/lib/defaults/detectNetwork';
import retry from '@redux-offline/redux-offline/lib/defaults/retry';
import discard from '@redux-offline/redux-offline/lib/defaults/discard';
import defaultCommit from '@redux-offline/redux-offline/lib/defaults/defaultCommit';
import defaultRollback from '@redux-offline/redux-offline/lib/defaults/defaultRollback';
import offlineStateLens from '@redux-offline/redux-offline/lib/defaults/offlineStateLens';

const createOffline = require('../vendor/redux-offline').createOffline;

// Simulate default config but skip importing unused items
const offlineConfig = {
rehydrate: true,
// persist,
detectNetwork,
// effect,
retry,
discard,
defaultCommit,
defaultRollback,
// persistAutoRehydrate,
offlineStateLens,
// queue,
returnPromises: false
};

export { createOffline, offlineConfig, RESET_STATE, busy };
181 changes: 0 additions & 181 deletions packages/outbox/vendor/redux-offline.js

This file was deleted.

2 changes: 1 addition & 1 deletion packages/store/src/storage.native.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { AsyncStorage } from 'react-native';
import AsyncStorage from '@react-native-community/async-storage';

export function createStorage(name) {
return {
Expand Down

0 comments on commit 7fe15ab

Please sign in to comment.