Komut paleti

@yasinsensoy/native

React Native · API'ler ve yardımcılar

App

Registers the app's root component.

2 dışa aktarım

İçe aktarma

import { registerApp, APP_COMPONENT_NAME } from "@yasinsensoy/native";

registerApp

fonksiyon

Registers the app's root component. Call it once in index.js instead of AppRegistry.registerComponent; the app needs no app.json, because the native projects open the fixed APP_COMPONENT_NAME that sync writes into them.

registerApp(component: ComponentType): void

Örnekler

import { registerApp } from "@yasinsensoy/native/app";

// App: the root component of your app.
registerApp(App);

Name the root component is registered under. sync writes it into the native projects (getMainComponentName on Android, withModuleName on iOS), so the app's display and project name (ui.config name) can change without touching the JavaScript entry.

APP_COMPONENT_NAME: export declare const APP_COMPONENT_NAME = "main"