javascript - react-native navigator not calling renderScene method -


i'm trying use react-native navigator.

this app.js:

import react 'react'; import {            appregistry,           stylesheet,            text,            view,           navigator,        } 'react-native'; import login './components/login/login';  export default class app extends react.component {   constructor() {     console.log("in default class constructor")     super()     this.renderscene = this.renderscene.bind(this);   }    renderscene(route, navigator){     console.log("route: ",route)     if(route.name == 'login'){       return <login navigator={navigator} />     }     else if(route.name == 'home'){       return <home navigator={navigator} />     }   }    render() {     console.log("in render")       return (            <navigator             initialroute={{ name: 'login' }}            renderscene = {this.renderscene}        />     );   } } 

this login.js

 import react 'react';     import {                appregistry,               stylesheet,                text,                view,                navigator,             } 'react-native';      class login extends react.component {    render() {     return (       <view style={styles.container}>  <text>domain: </text> </view>     );   } } const styles = stylesheet.create({   container: {     flex: 1,     padding: 20,     height: 1000,     width: 350   } });     module.exports = login; 

the console statement in renderscene method not getting hit. if render login working, if use navigator mentioned above doesn't render on screen compiles without errors.

console output:

 in default class constructor   in render 


Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -