From fa189baf81381638e195dbd21570ec93bb46b1fa Mon Sep 17 00:00:00 2001 From: RJ David Date: Wed, 6 Sep 2017 21:43:14 +0800 Subject: [PATCH 1/4] Fixed deprecated React.createClass() to a new package createReactClass() --- package.json | 1 + src/components/createContainer.js | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 9e71f2b..408516b 100644 --- a/package.json +++ b/package.json @@ -27,6 +27,7 @@ "homepage": "https://github.com/inProgress-team/react-native-meteor#readme", "dependencies": { "base-64": "^0.1.0", + "create-react-class": "^15.6.0", "crypto-js": "^3.1.6", "ejson": "^2.1.2", "minimongo-cache": "0.0.48", diff --git a/src/components/createContainer.js b/src/components/createContainer.js index 6ca482f..c924b18 100644 --- a/src/components/createContainer.js +++ b/src/components/createContainer.js @@ -3,6 +3,7 @@ */ import React from 'react'; +import createReactClass from 'createReactClass'; import Mixin from './Mixin'; @@ -18,7 +19,7 @@ export default function createContainer(options = {}, Component) { getMeteorData } = expandedOptions; - return React.createClass({ + return createReactClass({ displayName: 'MeteorDataContainer', mixins: [Mixin], getMeteorData() { From 6c4ded4de5076ab20ef5f304869af057dba0c74c Mon Sep 17 00:00:00 2001 From: RJ David Date: Wed, 6 Sep 2017 22:12:00 +0800 Subject: [PATCH 2/4] Fixed module name --- src/components/createContainer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/createContainer.js b/src/components/createContainer.js index c924b18..040df15 100644 --- a/src/components/createContainer.js +++ b/src/components/createContainer.js @@ -3,7 +3,7 @@ */ import React from 'react'; -import createReactClass from 'createReactClass'; +import createReactClass from 'create-react-class'; import Mixin from './Mixin'; From 4b3ad5406272fabd73d1afd1c32e6d989b2ce844 Mon Sep 17 00:00:00 2001 From: RJ David Date: Tue, 12 Sep 2017 14:39:17 +0800 Subject: [PATCH 3/4] Remove connection after logout --- src/user/User.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/user/User.js b/src/user/User.js index 40e2be3..ef06c60 100644 --- a/src/user/User.js +++ b/src/user/User.js @@ -25,7 +25,7 @@ module.exports = { logout(callback) { call("logout", err => { this.handleLogout(); - this.connect(); + //this.connect(); typeof callback == 'function' && callback(err); }); From 92af60211adc05a8ea3719ddb37fbdf24885193a Mon Sep 17 00:00:00 2001 From: RJ David Date: Tue, 12 Sep 2017 14:47:38 +0800 Subject: [PATCH 4/4] Reverted change --- src/user/User.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/user/User.js b/src/user/User.js index ef06c60..40e2be3 100644 --- a/src/user/User.js +++ b/src/user/User.js @@ -25,7 +25,7 @@ module.exports = { logout(callback) { call("logout", err => { this.handleLogout(); - //this.connect(); + this.connect(); typeof callback == 'function' && callback(err); });