From bd7c883cc53860acd6016c21dc4a6c5526545e52 Mon Sep 17 00:00:00 2001 From: Artur Girenko Date: Fri, 14 Jul 2017 20:37:33 +0200 Subject: [PATCH] use reagent 0.7.0 fixes #122 --- re-natal.coffee | 7 ++++--- resources/figwheel-bridge.js | 3 ++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/re-natal.coffee b/re-natal.coffee index 2472a7c..34402ba 100644 --- a/re-natal.coffee +++ b/re-natal.coffee @@ -57,9 +57,9 @@ interfaceConf = sources: common: ["events.cljs", "subs.cljs", "db.cljs"] other: [["reagent_dom.cljs","reagent/dom.cljs"], ["reagent_dom_server.cljs","reagent/dom/server.cljs"]] - deps: ['[reagent "0.6.1" :exclusions [cljsjs/react cljsjs/react-dom cljsjs/react-dom-server]]' + deps: ['[reagent "0.7.0" :exclusions [cljsjs/react cljsjs/react-dom cljsjs/react-dom-server cljsjs/create-react-class]]' '[re-frame "0.9.2"]'] - shims: ["cljsjs.react", "cljsjs.react.dom", "cljsjs.react.dom.server"] + shims: ["cljsjs.react", "cljsjs.react.dom", "cljsjs.react.dom.server", "cljsjs.create-react-class"] sampleCommandNs: '(in-ns \'$PROJECT_NAME_HYPHENATED$.ios.core)' sampleCommand: '(dispatch [:set-greeting "Hello Native World!"])' 'om-next': @@ -368,6 +368,7 @@ patchReactNativePackager = () -> shimCljsNamespace = (ns) -> filePath = "src/" + ns.replace(/\./g, "/") + ".cljs" + filePath = filePath.replace(/-/g, "_") fs.mkdirpSync fpath.dirname(filePath) fs.writeFileSync(filePath, "(ns #{ns})") @@ -637,7 +638,7 @@ openXcode = (name) -> message generateRequireModulesCode = (modules) -> - jsCode = "var modules={'react-native': require('react-native'), 'react': require('react')};" + jsCode = "var modules={'react-native': require('react-native'), 'react': require('react'), 'create-react-class': require('create-react-class')};" for m in modules jsCode += "modules['#{m}']=require('#{m}');"; jsCode += '\n' diff --git a/resources/figwheel-bridge.js b/resources/figwheel-bridge.js index e5d9a9c..03b25df 100644 --- a/resources/figwheel-bridge.js +++ b/resources/figwheel-bridge.js @@ -14,6 +14,7 @@ var config = { }; var React = require('react'); +var createReactClass = require('create-react-class'); var ReactNative = require('react-native'); var WebSocket = require('WebSocket'); var self; @@ -35,7 +36,7 @@ var evalListeners = [ // Functions to be called after each js file is loaded and }]; var figwheelApp = function (platform, devHost) { - return React.createClass({ + return createReactClass({ getInitialState: function () { return {loaded: false} },