javascript - Trying to do a release build with react-native, fails? -
i know why react-native build fails in release scheme , works fine in debug scheme?
i'm using react-native-side-menu
, react-native-navbar
. here code.
'use strict'; var react = require('react-native'); var { appregistry, stylesheet, text, view, navigator, scrollview, touchablehighlight, alertios, } = react; var fluxxor = require('fluxxor'); var flux = require('./flux'); var sidemenu = require('react-native-side-menu'); var mainstyles = require('./styles/main'); var navigationbarview = react.createclass({ render: function() { return ( <view> <text style={{ fontsize: 36 }}>hello world</text> <text style={{ fontsize: 36 }}>hello world</text> <text style={{ fontsize: 36 }}>hello world</text> <text style={{ fontsize: 36 }}>hello world</text> </view> ); } }); var menu = react.createclass({ about: function() { this.props.menuactions.close(); }, render: function() { return ( <view> <text>menu</text> <text onpress={this.about}>about</text> </view> ); } }); // navigation content view var docit = react.createclass({ renderscene: function(route, navigator) { var component = route.component; var navbar = route.navigationbar; if (navbar) { navbar = react.addons.clonewithprops(navbar, { navigator: navigator, route: route }); } var menu = <menu/>; return ( <sidemenu menu={menu} touchtoclose={true} animation='spring' onchange={(isopen) => { console.log('isopen: ',isopen); } }> <view style={mainstyles.navigator}> {navbar} <view style={mainstyles.container}> <component menu={menu} navigator={navigator} route={route} flux={flux} {...route.passprops} /> </view> </view> </sidemenu> ); }, render: function() { return ( <navigator style={mainstyles.navigator} renderscene={this.renderscene} initialroute={{ component: navigationbarview, }} configurescene={() => { return navigator.sceneconfigs.floatfromright; }} /> ); } }); appregistry.registercomponent('docit', () => docit);
the code using main.js
module basic , can rid of it. current logic wraps navigator
in sidemenu
can figure out in renderscene
. don't know why showing blank screen on release
build. works fine in debug
scheme.
Comments
Post a Comment