Skip to content

Commit

Permalink
Added workaround for AsyncStorage Github Issue facebook/react-native#…
Browse files Browse the repository at this point in the history
  • Loading branch information
gornostal committed Apr 18, 2018
1 parent e9e96b8 commit 875543e
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 1 deletion.
1 change: 1 addition & 0 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ android {
}

dependencies {
compile project(':rn-async-storage')
compile fileTree(dir: "libs", include: ["*.jar"])
compile "com.android.support:appcompat-v7:23.0.1"
compile "com.facebook.react:react-native:+" // From node_modules
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import android.app.Application;

import com.facebook.react.ReactApplication;
import org.gamega.RNAsyncStoragePackage;
import com.facebook.react.ReactNativeHost;
import com.facebook.react.ReactPackage;
import com.facebook.react.shell.MainReactPackage;
Expand All @@ -22,7 +23,8 @@ public boolean getUseDeveloperSupport() {
@Override
protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList(
new MainReactPackage()
new MainReactPackage(),
new RNAsyncStoragePackage()
);
}

Expand Down
2 changes: 2 additions & 0 deletions android/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
rootProject.name = 'ReactNativeDemoDApp'
include ':rn-async-storage'
project(':rn-async-storage').projectDir = new File(rootProject.projectDir, '../node_modules/rn-async-storage/android')

include ':app'
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
"react-navigation": "1.5.0",
"react-redux": "^5.0.7",
"redux": "^3.7.2",
"redux-promise-middleware": "^5.0.0",
"rn-async-storage": "^1.0.22",
"web3": "^0.20.6"
},
"devDependencies": {
Expand Down
8 changes: 8 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5627,6 +5627,10 @@ realpath-native@^1.0.0:
dependencies:
util.promisify "^1.0.0"

redux-promise-middleware@^5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/redux-promise-middleware/-/redux-promise-middleware-5.0.0.tgz#1656b24f9ac962bf11fbe55ea8360810e18d47a7"

redux@^3.7.2:
version "3.7.2"
resolved "https://registry.yarnpkg.com/redux/-/redux-3.7.2.tgz#06b73123215901d25d065be342eb026bc1c8537b"
Expand Down Expand Up @@ -5869,6 +5873,10 @@ rlp@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/rlp/-/rlp-2.0.0.tgz#9db384ff4b89a8f61563d92395d8625b18f3afb0"

rn-async-storage@^1.0.22:
version "1.0.22"
resolved "https://registry.yarnpkg.com/rn-async-storage/-/rn-async-storage-1.0.22.tgz#f239753fd9ea564e764d66f0dd6d5a93581510f0"

run-async@^2.2.0:
version "2.3.0"
resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.3.0.tgz#0371ab4ae0bdd720d4166d7dfda64ff7a445a6c0"
Expand Down

0 comments on commit 875543e

Please sign in to comment.