Create-react-native-app: Check the render method of `AwakeInDevApp`.

Created on 8 Apr 2017  路  5Comments  路  Source: expo/create-react-native-app

Please make our job easier by filling this template out to completion. If you're requesting a feature instead of reporting a bug, please feel free to skip the Environment and Reproducible Demo sections.

Description

Getting this error after latest update:

Warning: React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: object. You likely forgot to export your component from the file it's defined in. Check the render method of `AwakeInDevApp`.

Expected Behavior

I setup a basic application using Redux.

Observed Behavior

I am unable to render the application in Expo because of this error.

If there's an error message, please paste the full terminal output and error message in this code block:

8:15:00 AM: Bundling `node_modules/react-native-scripts/build/bin/crna-entry.js`
  No module changed.


8:15:00 AM: Loading your app...

8:15:01 AM: Warning: React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: object. You likely forgot to export your component from the file it's defined in. Check the render method of `AwakeInDevApp`.

Environment

Please run these commands in the project folder and fill in their results:

Also specify:

  1. Operating system: macOS Sierra 10.12.4
  2. Phone/emulator/simulator & version: Google Pixel XL

Reproducible Demo

Here's a repo I setup with the code: https://github.com/mwq27/rn-poc

Most helpful comment

Thanks for the detailed report and the reproduction! It looks like your App.js no longer exports a default component after your redux changes, and it also looks like you've added your own call to AppRegistry, which should instead be handled by CRNA. Can you try following the template and see if that fixes this?

All 5 comments

Thanks for the detailed report and the reproduction! It looks like your App.js no longer exports a default component after your redux changes, and it also looks like you've added your own call to AppRegistry, which should instead be handled by CRNA. Can you try following the template and see if that fixes this?

Yep, that was the problem. I removed that AppRegistry call and exported the component instead.

Thanks

Awesome!

what template? I looked at https://github.com/mwq27/rn-poc/blob/master/App.js and it looks like you have AppRegistry. I'm confused

@mwq27 Gracias. resolvi贸 mi problema

Was this page helpful?
0 / 5 - 0 ratings

Related issues

WeslleyNasRocha picture WeslleyNasRocha  路  4Comments

liyanxi picture liyanxi  路  3Comments

jckuhl picture jckuhl  路  4Comments

anp picture anp  路  3Comments

Palisand picture Palisand  路  5Comments