首页 > 解决方案 > 我真的可以不必在 React Native 中使用 AppRegistry.registerComponent 吗?

问题描述

昨天我发布了一个关于 React Native 的问题,其中一位回答者发布了一个没有AppRegistry.registerComponent. 但仅使用export default <identifier>.

我从这里读到 AppRegistry.registerComponent 非常重要,因为它为应用程序提供了“入口点”。但是为什么这个简单的export default <identifier>工作?这是否意味着我实际上不必使用AppRegistry.registerComponent任何东西来使其工作?在应用程序中定义入口点AppRegistery.registerComponent有什么优势/劣势?export default

标签: react-native

解决方案


推荐阅读