react-native#AppRegistry TypeScript Examples

The following examples show how to use react-native#AppRegistry. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: _document.tsx    From typescript-fun with MIT License 6 votes vote down vote up
static async getInitialProps({ renderPage }: DocumentContext) {
    AppRegistry.registerComponent(config.name, () => Main);
    // @ts-ignore React Native Web custom API.
    const { getStyleElement } = AppRegistry.getApplication(config.name);
    const page = renderPage();
    const styles = [
      // eslint-disable-next-line react/jsx-key
      <style dangerouslySetInnerHTML={{ __html: normalizeNextElements }} />,
      getStyleElement(),
    ];
    return { ...page, styles: React.Children.toArray(styles) };
  }
Example #2
Source File: _document.tsx    From typescript-fun with MIT License 6 votes vote down vote up
static async getInitialProps({ renderPage }: DocumentContext) {
    AppRegistry.registerComponent(config.name, () => Main);
    // @ts-ignore React Native Web custom API.
    const { getStyleElement } = AppRegistry.getApplication(config.name);
    const page = renderPage();
    const styles = [
      // eslint-disable-next-line react/jsx-key
      <style dangerouslySetInnerHTML={{ __html: normalizeNextElements }} />,
      getStyleElement(),
    ];
    return { ...page, styles: React.Children.toArray(styles) };
  }
Example #3
Source File: index.web.ts    From react-native-base-ui with MIT License 5 votes vote down vote up
AppRegistry.runApplication('appName', {
  // @ts-ignore
  rootTag: document.getElementById('root'),
});
Example #4
Source File: render.ts    From reactant with MIT License 5 votes vote down vote up
render = (app: JSX.Element, appName: string) => {
  AppRegistry.registerComponent(appName, () => () => app);
}
Example #5
Source File: index.tsx    From react-native-msal with MIT License 5 votes vote down vote up
AppRegistry.registerComponent(appName, () => App);
Example #6
Source File: index.tsx    From react-native-web-template with MIT License 5 votes vote down vote up
AppRegistry.runApplication("App", {
  initialProps: {},
  rootTag: document.getElementById("root")
});
Example #7
Source File: index.tsx    From react-native-web-template with MIT License 5 votes vote down vote up
AppRegistry.registerComponent("App", () => Encapsulator);
Example #8
Source File: index.ts    From natds-rn with ISC License 5 votes vote down vote up
// If you are using React Native vanilla
// and after installation you don't see your app name here, write it manually.
// If you use Expo you can safely remove this line.
AppRegistry.registerComponent('NatDSRN', () => StorybookUIRoot);
Example #9
Source File: index.tsx    From react-native-network-client with Apache License 2.0 5 votes vote down vote up
AppRegistry.registerComponent(appName, () => App);
Example #10
Source File: storybook.ts    From ai-lab with MIT License 5 votes vote down vote up
// If you are using React Native vanilla and after installation you don't see your app name here, write it manually.
// If you use Expo you should remove this line.
AppRegistry.registerComponent('AILabNative', () => StorybookUIRoot);
Example #11
Source File: index.tsx    From react-native-sticky-item with MIT License 5 votes vote down vote up
AppRegistry.registerComponent(appName, () => App);
Example #12
Source File: index.tsx    From react-native-detector with MIT License 5 votes vote down vote up
AppRegistry.registerComponent(appName, () => App);
Example #13
Source File: index.web.ts    From react-native-base-ui with MIT License 5 votes vote down vote up
AppRegistry.registerComponent('appName', () => App);
Example #14
Source File: index.ts    From react-native-base-ui with MIT License 5 votes vote down vote up
AppRegistry.registerComponent(appName, () => App);
Example #15
Source File: index.ts    From react-native-typescript-starter with MIT License 5 votes vote down vote up
AppRegistry.registerComponent(appName, () => App);
Example #16
Source File: index.ts    From mobile with Apache License 2.0 5 votes vote down vote up
AppRegistry.registerComponent(appName, () => App);
Example #17
Source File: index.tsx    From react-native-file-access with MIT License 5 votes vote down vote up
AppRegistry.registerComponent(appName, () => App);
Example #18
Source File: index.tsx    From sp-react-native-in-app-updates with MIT License 5 votes vote down vote up
AppRegistry.registerComponent(appName, () => App);
Example #19
Source File: index.tsx    From slider with ISC License 5 votes vote down vote up
AppRegistry.registerComponent(appName, () => App)
Example #20
Source File: index.ts    From BleInTheBackground-iOS with Apache License 2.0 5 votes vote down vote up
AppRegistry.registerComponent('BleInTheBackground', () => App);
Example #21
Source File: index.ts    From mobile with Apache License 2.0 5 votes vote down vote up
AppRegistry.registerComponent(appName, () => App);