Quantcast
Channel: Active questions tagged react-native+android - Stack Overflow
Viewing all articles
Browse latest Browse all 30350

Functions are not valid as a react child.This may happen if you return a component instead of from render

$
0
0

I am getting this error and its referring me to this Functions Are Not Valid As A React Child.This May Happen If You Return A Component Instead Of From Render. How can I solve this issue? Or go about solving this problem, please help!!!

    const App: () => React$Node = () => {
      return (

      <View >
          <Main {...this.props}/>
      </View>



And this is my Main component

    import React,{Component} from 'react';
    import {View,Text} from 'react-native';
    import createStore from './store/createStore';
    import AppContainer from './AppContainer';

    export default class Main extends Component{
        renderApp(){
           const initalState=window.__INITIAL_STATE__;
            const store=createStore(initalState);

        return(
            <AppContainer store={store}/>
        );

    }
    render(){
        return this.renderApp;
    }
}

  );
};

Viewing all articles
Browse latest Browse all 30350

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>