ios - react native render only part -


i have feed , bottom menu can filter feed. when filter activated feed reloads data api. root render causing menu collapse every time. how can make feed reloads?

var main = react.createclass({     getinitialstate: function() {         return {             reloadfeeddata: false,         };     },     reloadfeeddata: function(){         console.log('setting root state')         this.setstate({reloadfeeddata:true});     },     renderscene: function(route, nav) {         var reload = this.state.reloadfeeddata         switch (route.name) {             case 'feed':                 return (                   <feed navigator={nav} reloadfeeddata={reload} />                 );             default:                 return (                     <feed navigator={nav} reloadfeeddata={reload} />                 );         }     },     render: function() {         console.log('root render');         return (             <view style={styles.container}>             <navigator                 style={styles.navigator}                 renderscene={this.renderscene}                 initialroute={{           component: feed,         }}                 />             <bottommenu reloadfeeddata={this.reloadfeeddata} />             </view>         );     } }); 

to answer own question, issue bad componentwillreceiveprops triggered on things shouldnt.


Popular posts from this blog

c# - ODP.NET Oracle.ManagedDataAccess causes ORA-12537 network session end of file -

matlab - Compression and Decompression of ECG Signal using HUFFMAN ALGORITHM -

utf 8 - split utf-8 string into bytes in python -