Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

React Native - Registering components with AppRegistry

Tags:

react-native

I'm new to React Native, but I noticed in the main index.js file, you register the App component. I see this as similar to attaching the App component to a root element in React. I know I still have to export each component I create, but do I have to call this line within every component as well?

AppRegistry.registerComponent('App', () => App)
like image 720
jamesvphan Avatar asked Jun 05 '17 16:06

jamesvphan


1 Answers

No, you only need to do it for your top level app component.

like image 87
Ivan Wu Avatar answered Oct 17 '22 00:10

Ivan Wu