├── MeteorApp
├── .meteor
│ ├── .finished-upgraders
│ ├── .gitignore
│ ├── .id
│ ├── packages
│ ├── platforms
│ ├── release
│ └── versions
├── MeteorApp.css
├── MeteorApp.html
└── MeteorApp.js
├── README.md
├── RNApp
├── .flowconfig
├── .gitignore
├── .watchmanconfig
├── android
│ ├── app
│ │ ├── build.gradle
│ │ ├── proguard-rules.pro
│ │ ├── react.gradle
│ │ └── src
│ │ │ └── main
│ │ │ ├── AndroidManifest.xml
│ │ │ ├── java
│ │ │ └── com
│ │ │ │ └── rnapp
│ │ │ │ └── MainActivity.java
│ │ │ └── res
│ │ │ ├── mipmap-hdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-mdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xhdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xxhdpi
│ │ │ └── ic_launcher.png
│ │ │ └── values
│ │ │ ├── strings.xml
│ │ │ └── styles.xml
│ ├── build.gradle
│ ├── gradle.properties
│ ├── gradle
│ │ └── wrapper
│ │ │ ├── gradle-wrapper.jar
│ │ │ └── gradle-wrapper.properties
│ ├── gradlew
│ ├── gradlew.bat
│ └── settings.gradle
├── app
│ ├── actions
│ │ ├── actionTypes.js
│ │ └── index.js
│ ├── api
│ │ └── .gitkeep
│ ├── components
│ │ └── button.js
│ ├── config.js
│ ├── containers
│ │ ├── app.js
│ │ ├── signIn.js
│ │ └── signOut.js
│ ├── ddp.js
│ ├── helpers
│ │ └── .gitkeep
│ ├── images
│ │ └── .gitkeep
│ ├── index.js
│ ├── reducers
│ │ └── index.js
│ └── store
│ │ └── index.js
├── index.android.js
├── index.ios.js
├── ios
│ ├── RNApp.xcodeproj
│ │ ├── project.pbxproj
│ │ └── xcshareddata
│ │ │ └── xcschemes
│ │ │ └── RNApp.xcscheme
│ ├── RNApp
│ │ ├── AppDelegate.h
│ │ ├── AppDelegate.m
│ │ ├── Base.lproj
│ │ │ └── LaunchScreen.xib
│ │ ├── Images.xcassets
│ │ │ └── AppIcon.appiconset
│ │ │ │ └── Contents.json
│ │ ├── Info.plist
│ │ └── main.m
│ └── RNAppTests
│ │ ├── Info.plist
│ │ └── RNAppTests.m
├── package.json
└── redux-meteor-ddp
│ └── index.js
├── docs
└── react-native-project-organization.md
└── redux-meteor-ddp
├── index.js
└── package.json
/MeteorApp/.meteor/.finished-upgraders:
--------------------------------------------------------------------------------
1 | # This file contains information which helps Meteor properly upgrade your
2 | # app when you run 'meteor update'. You should check it into version control
3 | # with your project.
4 |
5 | notices-for-0.9.0
6 | notices-for-0.9.1
7 | 0.9.4-platform-file
8 | notices-for-facebook-graph-api-2
9 | 1.2.0-standard-minifiers-package
10 | 1.2.0-meteor-platform-split
11 | 1.2.0-cordova-changes
12 | 1.2.0-breaking-changes
13 |
--------------------------------------------------------------------------------
/MeteorApp/.meteor/.gitignore:
--------------------------------------------------------------------------------
1 | local
2 |
--------------------------------------------------------------------------------
/MeteorApp/.meteor/.id:
--------------------------------------------------------------------------------
1 | # This file contains a token that is unique to your project.
2 | # Check it into your repository along with the rest of this directory.
3 | # It can be used for purposes such as:
4 | # - ensuring you don't accidentally deploy one app on top of another
5 | # - providing package authors with aggregated statistics
6 |
7 | 1s8geux1xmdvk412l25x8
8 |
--------------------------------------------------------------------------------
/MeteorApp/.meteor/packages:
--------------------------------------------------------------------------------
1 | # Meteor packages used by this project, one per line.
2 | # Check this file (and the other files in this directory) into your repository.
3 | #
4 | # 'meteor add' and 'meteor remove' will edit this file for you,
5 | # but you can also edit it by hand.
6 |
7 | meteor-base # Packages every Meteor app needs to have
8 | mobile-experience # Packages for a great mobile UX
9 | mongo # The database Meteor supports right now
10 | blaze-html-templates # Compile .html files into Meteor Blaze views
11 | session # Client-side reactive dictionary for your app
12 | jquery # Helpful client-side library
13 | tracker # Meteor's client-side reactive programming library
14 |
15 | standard-minifiers # JS/CSS minifiers run for production mode
16 | es5-shim # ECMAScript 5 compatibility for older browsers.
17 | ecmascript # Enable ECMAScript2015+ syntax in app code
18 |
19 | accounts-password
20 |
--------------------------------------------------------------------------------
/MeteorApp/.meteor/platforms:
--------------------------------------------------------------------------------
1 | server
2 | browser
3 |
--------------------------------------------------------------------------------
/MeteorApp/.meteor/release:
--------------------------------------------------------------------------------
1 | METEOR@1.2.1
2 |
--------------------------------------------------------------------------------
/MeteorApp/.meteor/versions:
--------------------------------------------------------------------------------
1 | accounts-base@1.2.2
2 | accounts-password@1.1.4
3 | autoupdate@1.2.4
4 | babel-compiler@5.8.24_1
5 | babel-runtime@0.1.4
6 | base64@1.0.4
7 | binary-heap@1.0.4
8 | blaze@2.1.3
9 | blaze-html-templates@1.0.1
10 | blaze-tools@1.0.4
11 | boilerplate-generator@1.0.4
12 | caching-compiler@1.0.0
13 | caching-html-compiler@1.0.2
14 | callback-hook@1.0.4
15 | check@1.1.0
16 | ddp@1.2.2
17 | ddp-client@1.2.1
18 | ddp-common@1.2.2
19 | ddp-rate-limiter@1.0.0
20 | ddp-server@1.2.2
21 | deps@1.0.9
22 | diff-sequence@1.0.1
23 | ecmascript@0.1.6
24 | ecmascript-runtime@0.2.6
25 | ejson@1.0.7
26 | email@1.0.8
27 | es5-shim@4.1.14
28 | fastclick@1.0.7
29 | geojson-utils@1.0.4
30 | hot-code-push@1.0.0
31 | html-tools@1.0.5
32 | htmljs@1.0.5
33 | http@1.1.1
34 | id-map@1.0.4
35 | jquery@1.11.4
36 | launch-screen@1.0.4
37 | livedata@1.0.15
38 | localstorage@1.0.5
39 | logging@1.0.8
40 | meteor@1.1.10
41 | meteor-base@1.0.1
42 | minifiers@1.1.7
43 | minimongo@1.0.10
44 | mobile-experience@1.0.1
45 | mobile-status-bar@1.0.6
46 | mongo@1.1.3
47 | mongo-id@1.0.1
48 | npm-bcrypt@0.7.8_2
49 | npm-mongo@1.4.39_1
50 | observe-sequence@1.0.7
51 | ordered-dict@1.0.4
52 | promise@0.5.1
53 | random@1.0.5
54 | rate-limit@1.0.0
55 | reactive-dict@1.1.3
56 | reactive-var@1.0.6
57 | reload@1.1.4
58 | retry@1.0.4
59 | routepolicy@1.0.6
60 | service-configuration@1.0.5
61 | session@1.1.1
62 | sha@1.0.4
63 | spacebars@1.0.7
64 | spacebars-compiler@1.0.7
65 | srp@1.0.4
66 | standard-minifiers@1.0.2
67 | templating@1.1.5
68 | templating-tools@1.0.0
69 | tracker@1.0.9
70 | ui@1.0.8
71 | underscore@1.0.4
72 | url@1.0.5
73 | webapp@1.2.3
74 | webapp-hashing@1.0.5
75 |
--------------------------------------------------------------------------------
/MeteorApp/MeteorApp.css:
--------------------------------------------------------------------------------
1 | /* CSS declarations go here */
2 |
--------------------------------------------------------------------------------
/MeteorApp/MeteorApp.html:
--------------------------------------------------------------------------------
1 |
2 | MeteorApp
3 |
4 |
5 |
6 | Welcome to Meteor!
7 |
8 | {{> hello}}
9 |
10 |
11 |
12 |
13 | You've pressed the button {{counter}} times.
14 |
15 |
--------------------------------------------------------------------------------
/MeteorApp/MeteorApp.js:
--------------------------------------------------------------------------------
1 | if (Meteor.isClient) {
2 | // counter starts at 0
3 | Session.setDefault('counter', 0);
4 |
5 | Template.hello.helpers({
6 | counter: function () {
7 | return Session.get('counter');
8 | }
9 | });
10 |
11 | Template.hello.events({
12 | 'click button': function () {
13 | // increment the counter when button is clicked
14 | Session.set('counter', Session.get('counter') + 1);
15 | }
16 | });
17 | }
18 |
19 | if (Meteor.isServer) {
20 | Meteor.startup(function () {
21 | // code to run on server at startup
22 | });
23 | }
24 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | **NOTE: THIS WAS JUST AN EXPERIMENT. I WOULD NOT USE THIS AS A REFERENCE FOR BUILDING AN APPLICATION. PLEASE CHECK OUT MY OTHER REPOS FOR BETTER INSTRUCTION**
2 |
3 |
4 | # React Native, Redux, and Meteor
5 |
6 | A demonstration of using React Native, Redux, and Meteor together.
7 |
8 | Project initially based on the [React Native Meteor Boilerplate](https://github.com/spencercarli/react-native-meteor-boilerplate).
9 |
--------------------------------------------------------------------------------
/RNApp/.flowconfig:
--------------------------------------------------------------------------------
1 | [ignore]
2 |
3 | # We fork some components by platform.
4 | .*/*.web.js
5 | .*/*.android.js
6 |
7 | # Some modules have their own node_modules with overlap
8 | .*/node_modules/node-haste/.*
9 |
10 | # Ugh
11 | .*/node_modules/babel.*
12 | .*/node_modules/babylon.*
13 | .*/node_modules/invariant.*
14 |
15 | # Ignore react and fbjs where there are overlaps, but don't ignore
16 | # anything that react-native relies on
17 | .*/node_modules/fbjs/lib/Map.js
18 | .*/node_modules/fbjs/lib/Promise.js
19 | .*/node_modules/fbjs/lib/fetch.js
20 | .*/node_modules/fbjs/lib/ExecutionEnvironment.js
21 | .*/node_modules/fbjs/lib/isEmpty.js
22 | .*/node_modules/fbjs/lib/crc32.js
23 | .*/node_modules/fbjs/lib/ErrorUtils.js
24 |
25 | # Flow has a built-in definition for the 'react' module which we prefer to use
26 | # over the currently-untyped source
27 | .*/node_modules/react/react.js
28 | .*/node_modules/react/lib/React.js
29 | .*/node_modules/react/lib/ReactDOM.js
30 |
31 | # Ignore commoner tests
32 | .*/node_modules/commoner/test/.*
33 |
34 | # See https://github.com/facebook/flow/issues/442
35 | .*/react-tools/node_modules/commoner/lib/reader.js
36 |
37 | # Ignore jest
38 | .*/node_modules/jest-cli/.*
39 |
40 | # Ignore Website
41 | .*/website/.*
42 |
43 | [include]
44 |
45 | [libs]
46 | node_modules/react-native/Libraries/react-native/react-native-interface.js
47 |
48 | [options]
49 | module.system=haste
50 |
51 | munge_underscores=true
52 |
53 | module.name_mapper='^image![a-zA-Z0-9$_-]+$' -> 'GlobalImageStub'
54 | module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\)$' -> 'RelativeImageStub'
55 |
56 | suppress_type=$FlowIssue
57 | suppress_type=$FlowFixMe
58 | suppress_type=$FixMe
59 |
60 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(2[0-1]\\|1[0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
61 | suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(2[0-1]\\|1[0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
62 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
63 |
64 | [version]
65 | 0.21.0
66 |
--------------------------------------------------------------------------------
/RNApp/.gitignore:
--------------------------------------------------------------------------------
1 | # OSX
2 | #
3 | .DS_Store
4 |
5 | # Xcode
6 | #
7 | build/
8 | *.pbxuser
9 | !default.pbxuser
10 | *.mode1v3
11 | !default.mode1v3
12 | *.mode2v3
13 | !default.mode2v3
14 | *.perspectivev3
15 | !default.perspectivev3
16 | xcuserdata
17 | *.xccheckout
18 | *.moved-aside
19 | DerivedData
20 | *.hmap
21 | *.ipa
22 | *.xcuserstate
23 | project.xcworkspace
24 |
25 | # Android/IJ
26 | #
27 | .idea
28 | .gradle
29 | local.properties
30 |
31 | # node.js
32 | #
33 | node_modules/
34 | npm-debug.log
35 |
--------------------------------------------------------------------------------
/RNApp/.watchmanconfig:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/RNApp/android/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: "com.android.application"
2 |
3 | import com.android.build.OutputFile
4 |
5 | /**
6 | * The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets
7 | * and bundleReleaseJsAndAssets).
8 | * These basically call `react-native bundle` with the correct arguments during the Android build
9 | * cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the
10 | * bundle directly from the development server. Below you can see all the possible configurations
11 | * and their defaults. If you decide to add a configuration block, make sure to add it before the
12 | * `apply from: "react.gradle"` line.
13 | *
14 | * project.ext.react = [
15 | * // the name of the generated asset file containing your JS bundle
16 | * bundleAssetName: "index.android.bundle",
17 | *
18 | * // the entry file for bundle generation
19 | * entryFile: "index.android.js",
20 | *
21 | * // whether to bundle JS and assets in debug mode
22 | * bundleInDebug: false,
23 | *
24 | * // whether to bundle JS and assets in release mode
25 | * bundleInRelease: true,
26 | *
27 | * // whether to bundle JS and assets in another build variant (if configured).
28 | * // See http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Variants
29 | * // The configuration property is in the format 'bundleIn${productFlavor}${buildType}'
30 | * // bundleInFreeDebug: true,
31 | * // bundleInPaidRelease: true,
32 | * // bundleInBeta: true,
33 | *
34 | * // the root of your project, i.e. where "package.json" lives
35 | * root: "../../",
36 | *
37 | * // where to put the JS bundle asset in debug mode
38 | * jsBundleDirDebug: "$buildDir/intermediates/assets/debug",
39 | *
40 | * // where to put the JS bundle asset in release mode
41 | * jsBundleDirRelease: "$buildDir/intermediates/assets/release",
42 | *
43 | * // where to put drawable resources / React Native assets, e.g. the ones you use via
44 | * // require('./image.png')), in debug mode
45 | * resourcesDirDebug: "$buildDir/intermediates/res/merged/debug",
46 | *
47 | * // where to put drawable resources / React Native assets, e.g. the ones you use via
48 | * // require('./image.png')), in release mode
49 | * resourcesDirRelease: "$buildDir/intermediates/res/merged/release",
50 | *
51 | * // by default the gradle tasks are skipped if none of the JS files or assets change; this means
52 | * // that we don't look at files in android/ or ios/ to determine whether the tasks are up to
53 | * // date; if you have any other folders that you want to ignore for performance reasons (gradle
54 | * // indexes the entire tree), add them here. Alternatively, if you have JS files in android/
55 | * // for example, you might want to remove it from here.
56 | * inputExcludes: ["android/**", "ios/**"]
57 | * ]
58 | */
59 |
60 | apply from: "react.gradle"
61 |
62 | /**
63 | * Set this to true to create three separate APKs instead of one:
64 | * - A universal APK that works on all devices
65 | * - An APK that only works on ARM devices
66 | * - An APK that only works on x86 devices
67 | * The advantage is the size of the APK is reduced by about 4MB.
68 | * Upload all the APKs to the Play Store and people will download
69 | * the correct one based on the CPU architecture of their device.
70 | */
71 | def enableSeparateBuildPerCPUArchitecture = false
72 |
73 | /**
74 | * Run Proguard to shrink the Java bytecode in release builds.
75 | */
76 | def enableProguardInReleaseBuilds = false
77 |
78 | android {
79 | compileSdkVersion 23
80 | buildToolsVersion "23.0.1"
81 |
82 | defaultConfig {
83 | applicationId "com.rnapp"
84 | minSdkVersion 16
85 | targetSdkVersion 22
86 | versionCode 1
87 | versionName "1.0"
88 | ndk {
89 | abiFilters "armeabi-v7a", "x86"
90 | }
91 | }
92 | splits {
93 | abi {
94 | enable enableSeparateBuildPerCPUArchitecture
95 | universalApk false
96 | reset()
97 | include "armeabi-v7a", "x86"
98 | }
99 | }
100 | buildTypes {
101 | release {
102 | minifyEnabled enableProguardInReleaseBuilds
103 | proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
104 | }
105 | }
106 | // applicationVariants are e.g. debug, release
107 | applicationVariants.all { variant ->
108 | variant.outputs.each { output ->
109 | // For each separate APK per architecture, set a unique version code as described here:
110 | // http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
111 | def versionCodes = ["armeabi-v7a":1, "x86":2]
112 | def abi = output.getFilter(OutputFile.ABI)
113 | if (abi != null) { // null for the universal-debug, universal-release variants
114 | output.versionCodeOverride =
115 | versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
116 | }
117 | }
118 | }
119 | }
120 |
121 | dependencies {
122 | compile fileTree(dir: "libs", include: ["*.jar"])
123 | compile "com.android.support:appcompat-v7:23.0.1"
124 | compile "com.facebook.react:react-native:0.20.+"
125 | }
126 |
--------------------------------------------------------------------------------
/RNApp/android/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
19 | # Disabling obfuscation is useful if you collect stack traces from production crashes
20 | # (unless you are using a system that supports de-obfuscate the stack traces).
21 | -dontobfuscate
22 |
23 | # React Native
24 |
25 | # Keep our interfaces so they can be used by other ProGuard rules.
26 | # See http://sourceforge.net/p/proguard/bugs/466/
27 | -keep,allowobfuscation @interface com.facebook.proguard.annotations.DoNotStrip
28 | -keep,allowobfuscation @interface com.facebook.proguard.annotations.KeepGettersAndSetters
29 |
30 | # Do not strip any method/class that is annotated with @DoNotStrip
31 | -keep @com.facebook.proguard.annotations.DoNotStrip class *
32 | -keepclassmembers class * {
33 | @com.facebook.proguard.annotations.DoNotStrip *;
34 | }
35 |
36 | -keepclassmembers @com.facebook.proguard.annotations.KeepGettersAndSetters class * {
37 | void set*(***);
38 | *** get*();
39 | }
40 |
41 | -keep class * extends com.facebook.react.bridge.JavaScriptModule { *; }
42 | -keep class * extends com.facebook.react.bridge.NativeModule { *; }
43 | -keepclassmembers,includedescriptorclasses class * { native ; }
44 | -keepclassmembers class * { @com.facebook.react.uimanager.UIProp ; }
45 | -keepclassmembers class * { @com.facebook.react.uimanager.annotations.ReactProp ; }
46 | -keepclassmembers class * { @com.facebook.react.uimanager.annotations.ReactPropGroup ; }
47 |
48 | -dontwarn com.facebook.react.**
49 |
50 | # okhttp
51 |
52 | -keepattributes Signature
53 | -keepattributes *Annotation*
54 | -keep class com.squareup.okhttp.** { *; }
55 | -keep interface com.squareup.okhttp.** { *; }
56 | -dontwarn com.squareup.okhttp.**
57 |
58 | # okio
59 |
60 | -keep class sun.misc.Unsafe { *; }
61 | -dontwarn java.nio.file.*
62 | -dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
63 | -dontwarn okio.**
64 |
65 | # stetho
66 |
67 | -dontwarn com.facebook.stetho.**
68 |
--------------------------------------------------------------------------------
/RNApp/android/app/react.gradle:
--------------------------------------------------------------------------------
1 | import org.apache.tools.ant.taskdefs.condition.Os
2 |
3 | def config = project.hasProperty("react") ? project.react : [];
4 |
5 | def bundleAssetName = config.bundleAssetName ?: "index.android.bundle"
6 | def entryFile = config.entryFile ?: "index.android.js"
7 |
8 | // because elvis operator
9 | def elvisFile(thing) {
10 | return thing ? file(thing) : null;
11 | }
12 |
13 | def reactRoot = elvisFile(config.root) ?: file("../../")
14 | def inputExcludes = config.inputExcludes ?: ["android/**", "ios/**"]
15 |
16 | void runBefore(String dependentTaskName, Task task) {
17 | Task dependentTask = tasks.findByPath(dependentTaskName);
18 | if (dependentTask != null) {
19 | dependentTask.dependsOn task
20 | }
21 | }
22 |
23 | gradle.projectsEvaluated {
24 | // Grab all build types and product flavors
25 | def buildTypes = android.buildTypes.collect { type -> type.name }
26 | def productFlavors = android.productFlavors.collect { flavor -> flavor.name }
27 |
28 | // When no product flavors defined, use empty
29 | if (!productFlavors) productFlavors.add('')
30 |
31 | productFlavors.each { productFlavorName ->
32 | buildTypes.each { buildTypeName ->
33 | // Create variant and source names
34 | def sourceName = "${buildTypeName}"
35 | def targetName = "${sourceName.capitalize()}"
36 | if (productFlavorName) {
37 | sourceName = "${productFlavorName}${targetName}"
38 | }
39 |
40 | // React js bundle directories
41 | def jsBundleDirConfigName = "jsBundleDir${targetName}"
42 | def jsBundleDir = elvisFile(config."$jsBundleDirConfigName") ?:
43 | file("$buildDir/intermediates/assets/${sourceName}")
44 |
45 | def resourcesDirConfigName = "jsBundleDir${targetName}"
46 | def resourcesDir = elvisFile(config."${resourcesDirConfigName}") ?:
47 | file("$buildDir/intermediates/res/merged/${sourceName}")
48 | def jsBundleFile = file("$jsBundleDir/$bundleAssetName")
49 |
50 | // Bundle task name for variant
51 | def bundleJsAndAssetsTaskName = "bundle${targetName}JsAndAssets"
52 |
53 | def currentBundleTask = tasks.create(
54 | name: bundleJsAndAssetsTaskName,
55 | type: Exec) {
56 | group = "react"
57 | description = "bundle JS and assets for ${targetName}."
58 |
59 | // Create dirs if they are not there (e.g. the "clean" task just ran)
60 | doFirst {
61 | jsBundleDir.mkdirs()
62 | resourcesDir.mkdirs()
63 | }
64 |
65 | // Set up inputs and outputs so gradle can cache the result
66 | inputs.files fileTree(dir: reactRoot, excludes: inputExcludes)
67 | outputs.dir jsBundleDir
68 | outputs.dir resourcesDir
69 |
70 | // Set up the call to the react-native cli
71 | workingDir reactRoot
72 |
73 | // Set up dev mode
74 | def devEnabled = !targetName.toLowerCase().contains("release")
75 | if (Os.isFamily(Os.FAMILY_WINDOWS)) {
76 | commandLine "cmd", "/c", "react-native", "bundle", "--platform", "android", "--dev", "${devEnabled}",
77 | "--entry-file", entryFile, "--bundle-output", jsBundleFile, "--assets-dest", resourcesDir
78 | } else {
79 | commandLine "react-native", "bundle", "--platform", "android", "--dev", "${devEnabled}",
80 | "--entry-file", entryFile, "--bundle-output", jsBundleFile, "--assets-dest", resourcesDir
81 | }
82 |
83 | enabled config."bundleIn${targetName}" ?: targetName.toLowerCase().contains("release")
84 | }
85 |
86 | // Hook bundle${productFlavor}${buildType}JsAndAssets into the android build process
87 | currentBundleTask.dependsOn("merge${targetName}Resources")
88 | currentBundleTask.dependsOn("merge${targetName}Assets")
89 |
90 | runBefore("processArmeabi-v7a${targetName}Resources", currentBundleTask)
91 | runBefore("processX86${targetName}Resources", currentBundleTask)
92 | runBefore("processUniversal${targetName}Resources", currentBundleTask)
93 | runBefore("process${targetName}Resources", currentBundleTask)
94 | }
95 | }
96 | }
97 |
--------------------------------------------------------------------------------
/RNApp/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
11 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/RNApp/android/app/src/main/java/com/rnapp/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.rnapp;
2 |
3 | import com.facebook.react.ReactActivity;
4 | import com.facebook.react.ReactPackage;
5 | import com.facebook.react.shell.MainReactPackage;
6 |
7 | import java.util.Arrays;
8 | import java.util.List;
9 |
10 | public class MainActivity extends ReactActivity {
11 |
12 | /**
13 | * Returns the name of the main component registered from JavaScript.
14 | * This is used to schedule rendering of the component.
15 | */
16 | @Override
17 | protected String getMainComponentName() {
18 | return "RNApp";
19 | }
20 |
21 | /**
22 | * Returns whether dev mode should be enabled.
23 | * This enables e.g. the dev menu.
24 | */
25 | @Override
26 | protected boolean getUseDeveloperSupport() {
27 | return BuildConfig.DEBUG;
28 | }
29 |
30 | /**
31 | * A list of packages used by the app. If the app uses additional views
32 | * or modules besides the default ones, add more packages here.
33 | */
34 | @Override
35 | protected List getPackages() {
36 | return Arrays.asList(
37 | new MainReactPackage()
38 | );
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/RNApp/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spencercarli/react-native-redux-meteor/ac5bc0fd23e9ea69b20b706260936dd63aa6ffeb/RNApp/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/RNApp/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spencercarli/react-native-redux-meteor/ac5bc0fd23e9ea69b20b706260936dd63aa6ffeb/RNApp/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/RNApp/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spencercarli/react-native-redux-meteor/ac5bc0fd23e9ea69b20b706260936dd63aa6ffeb/RNApp/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/RNApp/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spencercarli/react-native-redux-meteor/ac5bc0fd23e9ea69b20b706260936dd63aa6ffeb/RNApp/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/RNApp/android/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | RNApp
3 |
4 |
--------------------------------------------------------------------------------
/RNApp/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/RNApp/android/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | repositories {
5 | jcenter()
6 | }
7 | dependencies {
8 | classpath 'com.android.tools.build:gradle:1.3.1'
9 |
10 | // NOTE: Do not place your application dependencies here; they belong
11 | // in the individual module build.gradle files
12 | }
13 | }
14 |
15 | allprojects {
16 | repositories {
17 | mavenLocal()
18 | jcenter()
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/RNApp/android/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m
13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
14 |
15 | # When configured, Gradle will run in incubating parallel mode.
16 | # This option should only be used with decoupled projects. More details, visit
17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
18 | # org.gradle.parallel=true
19 |
20 | android.useDeprecatedNdk=true
21 |
--------------------------------------------------------------------------------
/RNApp/android/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spencercarli/react-native-redux-meteor/ac5bc0fd23e9ea69b20b706260936dd63aa6ffeb/RNApp/android/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/RNApp/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | zipStoreBase=GRADLE_USER_HOME
4 | zipStorePath=wrapper/dists
5 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.4-all.zip
6 |
--------------------------------------------------------------------------------
/RNApp/android/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | ##############################################################################
4 | ##
5 | ## Gradle start up script for UN*X
6 | ##
7 | ##############################################################################
8 |
9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
10 | DEFAULT_JVM_OPTS=""
11 |
12 | APP_NAME="Gradle"
13 | APP_BASE_NAME=`basename "$0"`
14 |
15 | # Use the maximum available, or set MAX_FD != -1 to use that value.
16 | MAX_FD="maximum"
17 |
18 | warn ( ) {
19 | echo "$*"
20 | }
21 |
22 | die ( ) {
23 | echo
24 | echo "$*"
25 | echo
26 | exit 1
27 | }
28 |
29 | # OS specific support (must be 'true' or 'false').
30 | cygwin=false
31 | msys=false
32 | darwin=false
33 | case "`uname`" in
34 | CYGWIN* )
35 | cygwin=true
36 | ;;
37 | Darwin* )
38 | darwin=true
39 | ;;
40 | MINGW* )
41 | msys=true
42 | ;;
43 | esac
44 |
45 | # For Cygwin, ensure paths are in UNIX format before anything is touched.
46 | if $cygwin ; then
47 | [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
48 | fi
49 |
50 | # Attempt to set APP_HOME
51 | # Resolve links: $0 may be a link
52 | PRG="$0"
53 | # Need this for relative symlinks.
54 | while [ -h "$PRG" ] ; do
55 | ls=`ls -ld "$PRG"`
56 | link=`expr "$ls" : '.*-> \(.*\)$'`
57 | if expr "$link" : '/.*' > /dev/null; then
58 | PRG="$link"
59 | else
60 | PRG=`dirname "$PRG"`"/$link"
61 | fi
62 | done
63 | SAVED="`pwd`"
64 | cd "`dirname \"$PRG\"`/" >&-
65 | APP_HOME="`pwd -P`"
66 | cd "$SAVED" >&-
67 |
68 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
69 |
70 | # Determine the Java command to use to start the JVM.
71 | if [ -n "$JAVA_HOME" ] ; then
72 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
73 | # IBM's JDK on AIX uses strange locations for the executables
74 | JAVACMD="$JAVA_HOME/jre/sh/java"
75 | else
76 | JAVACMD="$JAVA_HOME/bin/java"
77 | fi
78 | if [ ! -x "$JAVACMD" ] ; then
79 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
80 |
81 | Please set the JAVA_HOME variable in your environment to match the
82 | location of your Java installation."
83 | fi
84 | else
85 | JAVACMD="java"
86 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
87 |
88 | Please set the JAVA_HOME variable in your environment to match the
89 | location of your Java installation."
90 | fi
91 |
92 | # Increase the maximum file descriptors if we can.
93 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
94 | MAX_FD_LIMIT=`ulimit -H -n`
95 | if [ $? -eq 0 ] ; then
96 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
97 | MAX_FD="$MAX_FD_LIMIT"
98 | fi
99 | ulimit -n $MAX_FD
100 | if [ $? -ne 0 ] ; then
101 | warn "Could not set maximum file descriptor limit: $MAX_FD"
102 | fi
103 | else
104 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
105 | fi
106 | fi
107 |
108 | # For Darwin, add options to specify how the application appears in the dock
109 | if $darwin; then
110 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
111 | fi
112 |
113 | # For Cygwin, switch paths to Windows format before running java
114 | if $cygwin ; then
115 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
116 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
117 |
118 | # We build the pattern for arguments to be converted via cygpath
119 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
120 | SEP=""
121 | for dir in $ROOTDIRSRAW ; do
122 | ROOTDIRS="$ROOTDIRS$SEP$dir"
123 | SEP="|"
124 | done
125 | OURCYGPATTERN="(^($ROOTDIRS))"
126 | # Add a user-defined pattern to the cygpath arguments
127 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
128 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
129 | fi
130 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
131 | i=0
132 | for arg in "$@" ; do
133 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
134 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
135 |
136 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
137 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
138 | else
139 | eval `echo args$i`="\"$arg\""
140 | fi
141 | i=$((i+1))
142 | done
143 | case $i in
144 | (0) set -- ;;
145 | (1) set -- "$args0" ;;
146 | (2) set -- "$args0" "$args1" ;;
147 | (3) set -- "$args0" "$args1" "$args2" ;;
148 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
149 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
150 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
151 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
152 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
153 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
154 | esac
155 | fi
156 |
157 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
158 | function splitJvmOpts() {
159 | JVM_OPTS=("$@")
160 | }
161 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
162 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
163 |
164 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
165 |
--------------------------------------------------------------------------------
/RNApp/android/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12 | set DEFAULT_JVM_OPTS=
13 |
14 | set DIRNAME=%~dp0
15 | if "%DIRNAME%" == "" set DIRNAME=.
16 | set APP_BASE_NAME=%~n0
17 | set APP_HOME=%DIRNAME%
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windowz variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 | if "%@eval[2+2]" == "4" goto 4NT_args
53 |
54 | :win9xME_args
55 | @rem Slurp the command line arguments.
56 | set CMD_LINE_ARGS=
57 | set _SKIP=2
58 |
59 | :win9xME_args_slurp
60 | if "x%~1" == "x" goto execute
61 |
62 | set CMD_LINE_ARGS=%*
63 | goto execute
64 |
65 | :4NT_args
66 | @rem Get arguments from the 4NT Shell from JP Software
67 | set CMD_LINE_ARGS=%$
68 |
69 | :execute
70 | @rem Setup the command line
71 |
72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73 |
74 | @rem Execute Gradle
75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
76 |
77 | :end
78 | @rem End local scope for the variables with windows NT shell
79 | if "%ERRORLEVEL%"=="0" goto mainEnd
80 |
81 | :fail
82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83 | rem the _cmd.exe /c_ return code!
84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
85 | exit /b 1
86 |
87 | :mainEnd
88 | if "%OS%"=="Windows_NT" endlocal
89 |
90 | :omega
91 |
--------------------------------------------------------------------------------
/RNApp/android/settings.gradle:
--------------------------------------------------------------------------------
1 | rootProject.name = 'RNApp'
2 |
3 | include ':app'
4 |
--------------------------------------------------------------------------------
/RNApp/app/actions/actionTypes.js:
--------------------------------------------------------------------------------
1 | export const CHANGE_SIGN_IN_STATUS = 'CHANGE_SIGN_IN_STATUS';
2 |
--------------------------------------------------------------------------------
/RNApp/app/actions/index.js:
--------------------------------------------------------------------------------
1 | import * as actionTypes from './actionTypes';
2 |
3 | export function changeSignInStatus(status = false) {
4 | return { type: actionTypes.CHANGE_SIGN_IN_STATUS, status };
5 | }
6 |
--------------------------------------------------------------------------------
/RNApp/app/api/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spencercarli/react-native-redux-meteor/ac5bc0fd23e9ea69b20b706260936dd63aa6ffeb/RNApp/app/api/.gitkeep
--------------------------------------------------------------------------------
/RNApp/app/components/button.js:
--------------------------------------------------------------------------------
1 | import React, {
2 | Component,
3 | StyleSheet,
4 | Text,
5 | View,
6 | TouchableOpacity
7 | } from 'react-native';
8 |
9 | export default class Button extends Component {
10 | render() {
11 | let { text, onPress } = this.props;
12 | return (
13 |
14 |
15 | {text}
16 |
17 |
18 | );
19 | }
20 | }
21 |
22 | Button.defaultProps = {
23 | text: "Button Text",
24 | onPress: () => console.log('Button Pressed')
25 | };
26 |
27 | const styles = StyleSheet.create({
28 | button: {
29 | paddingVertical: 10,
30 | paddingHorizontal: 20,
31 | backgroundColor: '#A7A7A7',
32 | margin: 5
33 | },
34 | buttonText: {}
35 | });
36 |
--------------------------------------------------------------------------------
/RNApp/app/config.js:
--------------------------------------------------------------------------------
1 | const getDB = (env) => {
2 | switch (env) {
3 | case 'prod':
4 | case 'staging':
5 | return {
6 | url: '' // Websocket URL for your app. For a meteor app use `wss://my-app.meteor.com/websocket`
7 | }
8 | case 'dev':
9 | default:
10 | return {
11 | host: 'localhost',
12 | port: '3000'
13 | }
14 | }
15 | };
16 |
17 | let opts = {
18 | env: 'dev', // ['dev', 'staging', 'prod']
19 | // codePushDeploymentKey: '',
20 | ddpConfig: {
21 | maintainCollections : true,
22 | }
23 | }
24 |
25 | Object.assign(opts.ddpConfig, getDB(opts.env));
26 |
27 | export default opts;
28 |
--------------------------------------------------------------------------------
/RNApp/app/containers/app.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from 'react-native';
2 | import { connect } from 'react-redux';
3 |
4 | import ddpClient from '../ddp';
5 | import { changeSignInStatus } from '../actions';
6 |
7 | import SignIn from './signIn';
8 | import SignOut from './signOut';
9 |
10 | export class App extends Component {
11 | componentWillMount() {
12 | ddpClient.connect((error, wasReconnect) => {
13 | if (error) {
14 | console.log('connect error', error);
15 | } else {
16 | ddpClient.loginWithToken((err, res) => {
17 | if (!err) this.props.changedSignedIn(true);
18 | });
19 | }
20 | });
21 | }
22 |
23 | render() {
24 | if (this.props.signedIn) {
25 | return
26 | } else {
27 | return
28 | }
29 | }
30 | }
31 |
32 | const mapStateToProps = (state) => {
33 | return {
34 | signedIn: state.app.signedIn
35 | }
36 | }
37 |
38 | const mapDispatchToProps = (dispatch) => {
39 | return {
40 | changedSignedIn: (status) => dispatch(changeSignInStatus(status))
41 | }
42 | }
43 |
44 | export default connect(mapStateToProps, mapDispatchToProps)(App);
45 |
--------------------------------------------------------------------------------
/RNApp/app/containers/signIn.js:
--------------------------------------------------------------------------------
1 | import React, {
2 | Component,
3 | StyleSheet,
4 | Text,
5 | View,
6 | TextInput
7 | } from 'react-native';
8 | import { connect } from 'react-redux';
9 |
10 | import Button from '../components/button';
11 | import ddpClient from '../ddp';
12 |
13 | import { changeSignInStatus } from '../actions/index';
14 |
15 | export class SignIn extends Component {
16 | constructor(props) {
17 | super(props);
18 |
19 | this.state = {
20 | email: '',
21 | password: '',
22 | error: null
23 | }
24 | }
25 |
26 | validInput() {
27 | let { email, password } = this.state;
28 | let valid = false;
29 | if (email.length && password.length) {
30 | this.setState({error: null});
31 | valid = true;
32 | } else {
33 | this.setState({error: 'Email and password cannot be empty.'});
34 | }
35 |
36 | return valid;
37 | }
38 |
39 | handleSignIn() {
40 | if (this.validInput()) {
41 | ddpClient.loginWithEmail(this.state.email, this.state.password, (error, res) => {
42 | if (error) {
43 | this.setState({error: error.reason})
44 | } else {
45 | this.props.changedSignedIn(true);
46 | }
47 | });
48 | }
49 | }
50 |
51 | handleCreateAccount() {
52 | if (this.validInput()) {
53 | ddpClient.signUpWithEmail(this.state.email, this.state.password, (error, res) => {
54 | if (error) {
55 | this.setState({error: error.reason})
56 | } else {
57 | this.props.changedSignedIn(true);
58 | }
59 | });
60 | }
61 | }
62 |
63 | render() {
64 | let signIn, createAccount;
65 |
66 | if (this.props.connected) {
67 | signIn =