Skip to content
Advertisement

React Native – Nothing was returned from render

My application is stored in /src/index.js but i also have a /App.js and a /index.js.

I don’t know the difference between these and i think thats the reason im getting this error.

enter image description here

/index.js

JavaScript

/App.js

JavaScript

/src/index.js

JavaScript

I used create react native package to build this project and then tried to follow some guides to implement react navigation with redux.

Advertisement

Answer

Your default export is not returning anything :

JavaScript

To return JSX with an arrow function you need to use () => ( <JSX /> ) or the equivalent with curly braces : () => { return ( <JSX /> ) } :

JavaScript

or :

JavaScript
User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement