ios - Initialization Errors with React Native Tutorials -


i installed react native, , attempting follow tutorials on react native website accustomed it. every tutorial end doing gives me big red error screen in ios simulator.

as example, followed "hello world" tutorial on react native website

import react, { component } 'react'; import { appregistry, text } 'react-native';  class helloworldapp extends component {   render() {     return (       <text>hello world!</text>     );   } }  appregistry.registercomponent('helloworldapp', () => helloworldapp); 

but met error after compiling , running in simulator"

"application testproject has not been registered. either due require() error during initialization or failure call appregistry.registercomponent"

i'm confused because know nothing yet rn, following tutorials letter, , getting errors.

please advise?

there might 2 possibilities know of:

  1. when run react-native run-ios packager didn't start automatically. if that's case, run packager manually. so:

in 1 tab of terminal run react-native start , in run react-native run-ios.

  1. or while following document react native's site, might have changed app's name. like:

you created project using react-native init awesomeproject. project's name here awesomeproject.

and changed default index.ios.js , replaced component's name helloworldapp.

class helloworldapp extends component  appregistry.registercomponent('helloworldapp', () => helloworldapp); 

Comments

Popular posts from this blog

jOOQ update returning clause with Oracle -

java - Warning equals/hashCode on @Data annotation lombok with inheritance -

java - BasicPathUsageException: Cannot join to attribute of basic type -