Files
react-native/docs/next/appregistry.html
T
2020-12-31 14:19:18 +00:00

47 lines
57 KiB
HTML

<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="generator" content="Docusaurus v2.0.0-alpha.66">
<link rel="alternate" type="application/rss+xml" href="/blog/rss.xml" title="React Native Blog RSS Feed">
<link rel="alternate" type="application/atom+xml" href="/blog/atom.xml" title="React Native Blog Atom Feed">
<link rel="preconnect" href="https://www.google-analytics.com">
<script>window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)},ga.l=+new Date,ga("create","UA-41298772-2","auto"),ga("send","pageview")</script>
<script async src="https://www.google-analytics.com/analytics.js"></script>
<link rel="preconnect" href="https://www.google-analytics.com">
<link rel="preconnect" href="https://www.googletagmanager.com">
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-41298772-2"></script>
<script>function gtag(){dataLayer.push(arguments)}window.dataLayer=window.dataLayer||[],gtag("js",new Date),gtag("config","UA-41298772-2",{})</script>
<link rel="search" type="application/opensearchdescription+xml" title="React Native" href="/opensearch.xml">
<script src="https://cdn.jsdelivr.net/npm/focus-visible@5.2.0/dist/focus-visible.min.js" defer="defer"></script>
<script src="https://snack.expo.io/embed.js" defer="defer"></script><title data-react-helmet="true">AppRegistry · React Native</title><meta data-react-helmet="true" property="twitter:image" content="https://reactnative.dev/img/logo-og.png"><meta data-react-helmet="true" name="twitter:image:alt" content="Image for React Native"><meta data-react-helmet="true" name="docsearch:language" content="en"><meta data-react-helmet="true" name="docsearch:version" content="current"><meta data-react-helmet="true" name="docsearch:docusaurus_tag" content="docs-default-current"><meta data-react-helmet="true" property="og:image" content="https://reactnative.dev/img/logo-og.png"><meta data-react-helmet="true" name="twitter:card" content="summary"><meta data-react-helmet="true" name="twitter:image" content="https://reactnative.dev/img/logo-og.png"><meta data-react-helmet="true" property="og:title" content="AppRegistry · React Native"><meta data-react-helmet="true" name="description" content="Project with Native Code Required"><meta data-react-helmet="true" property="og:description" content="Project with Native Code Required"><meta data-react-helmet="true" property="og:url" content="https://reactnative.dev/docs/next/appregistry"><link data-react-helmet="true" rel="shortcut icon" href="/img/favicon.ico"><link data-react-helmet="true" rel="preconnect" href="https://BH4D9OD16A-dsn.algolia.net" crossorigin="anonymous"><link data-react-helmet="true" rel="canonical" href="https://reactnative.dev/docs/next/appregistry"><link rel="stylesheet" href="/styles.fccefeba.css">
<link rel="stylesheet" href="/main.ca40cabd.css">
<link rel="preload" href="/styles.07d522c6.js" as="script">
<link rel="preload" href="/runtime~main.c0800141.js" as="script">
<link rel="preload" href="/main.5a3c9855.js" as="script">
<link rel="preload" href="/1.ba9ce8bd.js" as="script">
<link rel="preload" href="/2.58cb5d3d.js" as="script">
<link rel="preload" href="/1f391b9e.a824c215.js" as="script">
<link rel="preload" href="/943.8b024446.js" as="script">
<link rel="preload" href="/935f2afb.71a0a895.js" as="script">
<link rel="preload" href="/17896441.0c201679.js" as="script">
<link rel="preload" href="/512a65de.513fcc96.js" as="script">
</head>
<body>
<script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus">
<nav class="navbar navbar--fixed-top navbar--dark"><div class="navbar__inner"><div class="navbar__items"><div aria-label="Navigation bar toggle" class="navbar__toggle" role="button" tabindex="0"><svg xmlns="http://www.w3.org/2000/svg" width="30" height="30" viewBox="0 0 30 30" role="img" focusable="false"><title>Menu</title><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></div><a class="navbar__brand" href="/"><img class="navbar__logo" src="/img/header_logo.svg" alt="React Native"><strong class="navbar__title">React Native</strong></a><div class="navbar__item dropdown dropdown--hoverable dropdown--left"><a class="navbar__item navbar__link" href="/docs/next/getting-started">Next</a><ul class="dropdown__menu"><li><a aria-current="page" class="dropdown__link dropdown__link--active" href="/docs/next/appregistry">Next</a></li><li><a class="dropdown__link" href="/docs/appregistry">0.63</a></li><li><a class="dropdown__link" href="/docs/0.62/appregistry">0.62</a></li><li><a class="dropdown__link" href="/docs/0.61/appregistry">0.61</a></li><li><a class="dropdown__link" href="/docs/0.60/appregistry">0.60</a></li><li><a class="dropdown__link" href="/versions">All versions</a></li></ul></div></div><div class="navbar__items navbar__items--right"><a class="navbar__item navbar__link" href="/docs/next/getting-started">Docs</a><a class="navbar__item navbar__link" href="/docs/next/components-and-apis">Components</a><a class="navbar__item navbar__link navbar__link--active" href="/docs/next/accessibilityinfo">API</a><a class="navbar__item navbar__link" href="/help">Community</a><a class="navbar__item navbar__link" href="/blog">Blog</a><a href="https://github.com/facebook/react-native" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link navbar-github-link" aria-label="GitHub repository"></a><div class="react-toggle react-toggle--disabled displayOnlyInLargeViewport_3lWe"><div class="react-toggle-track"><div class="react-toggle-track-check"><span class="toggle_gnXW">🌜</span></div><div class="react-toggle-track-x"><span class="toggle_gnXW">🌞</span></div></div><div class="react-toggle-thumb"></div><input type="checkbox" disabled="" aria-label="Dark mode toggle" class="react-toggle-screenreader-only"></div><button type="button" class="DocSearch DocSearch-Button" aria-label="Search"><svg width="20" height="20" class="DocSearch-Search-Icon" viewBox="0 0 20 20"><path d="M14.386 14.386l4.0877 4.0877-4.0877-4.0877c-2.9418 2.9419-7.7115 2.9419-10.6533 0-2.9419-2.9418-2.9419-7.7115 0-10.6533 2.9418-2.9419 7.7115-2.9419 10.6533 0 2.9419 2.9418 2.9419 7.7115 0 10.6533z" stroke="currentColor" fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round"></path></svg><span class="DocSearch-Button-Placeholder">Search</span><span class="DocSearch-Button-Key"></span><span class="DocSearch-Button-Key">K</span></button></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div><div class="navbar-sidebar"><div class="navbar-sidebar__brand"><a class="navbar__brand" href="/"><img class="navbar__logo" src="/img/header_logo.svg" alt="React Native"><strong class="navbar__title">React Native</strong></a></div><div class="navbar-sidebar__items"><div class="menu"><ul class="menu__list"><li class="menu__list-item"><a class="menu__link" href="/docs/next/getting-started">Docs</a></li><li class="menu__list-item"><a class="menu__link" href="/docs/next/components-and-apis">Components</a></li><li class="menu__list-item"><a class="menu__link navbar__link--active" href="/docs/next/accessibilityinfo">API</a></li><li class="menu__list-item"><a class="menu__link" href="/help">Community</a></li><li class="menu__list-item"><a class="menu__link" href="/blog">Blog</a></li><li class="menu__list-item"><a role="button" class="menu__link menu__link--sublist">Versions</a><ul class="menu__list"><li class="menu__list-item"><a aria-current="page" class="menu__link menu__link--active" href="/docs/next/appregistry">Next</a></li><li class="menu__list-item"><a class="menu__link" href="/docs/appregistry">0.63</a></li><li class="menu__list-item"><a class="menu__link" href="/docs/0.62/appregistry">0.62</a></li><li class="menu__list-item"><a class="menu__link" href="/docs/0.61/appregistry">0.61</a></li><li class="menu__list-item"><a class="menu__link" href="/docs/0.60/appregistry">0.60</a></li><li class="menu__list-item"><a class="menu__link" href="/versions">All versions</a></li></ul></li><li class="menu__list-item"><a href="https://github.com/facebook/react-native" target="_blank" rel="noopener noreferrer" class="menu__link navbar-github-link" aria-label="GitHub repository"></a></li></ul></div></div></div></nav><div class="main-wrapper"><div class="docPage_2UBv"><div class="docSidebarContainer_1hqR" role="complementary"><div class="sidebar_MSwm"><div class="menu menu--responsive menu_2hiu"><button aria-label="Open Menu" aria-haspopup="true" class="button button--secondary button--sm menu__button" type="button"><svg aria-label="Menu" class="sidebarMenuIcon_37TU" xmlns="http://www.w3.org/2000/svg" height="24" width="24" viewBox="0 0 32 32" role="img" focusable="false"><title>Menu</title><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><ul class="menu__list"><li class="menu__list-item"><a class="menu__link menu__link--sublist menu__link--active" href="#!">APIs</a><ul class="menu__list"><li class="menu__list-item"><a class="menu__link" tabindex="0" href="/docs/next/accessibilityinfo">AccessibilityInfo</a></li><li class="menu__list-item"><a class="menu__link" tabindex="0" href="/docs/next/alert">Alert</a></li><li class="menu__list-item"><a class="menu__link" tabindex="0" href="/docs/next/animated">Animated</a></li><li class="menu__list-item"><a class="menu__link" tabindex="0" href="/docs/next/animatedvalue">Animated.Value</a></li><li class="menu__list-item"><a class="menu__link" tabindex="0" href="/docs/next/animatedvaluexy">Animated.ValueXY</a></li><li class="menu__list-item"><a class="menu__link" tabindex="0" href="/docs/next/appearance">Appearance</a></li><li class="menu__list-item"><a aria-current="page" class="menu__link menu__link--active active" tabindex="0" href="/docs/next/appregistry">AppRegistry</a></li><li class="menu__list-item"><a class="menu__link" tabindex="0" href="/docs/next/appstate">AppState</a></li><li class="menu__list-item"><a class="menu__link" tabindex="0" href="/docs/next/devsettings">DevSettings</a></li><li class="menu__list-item"><a class="menu__link" tabindex="0" href="/docs/next/dimensions">Dimensions</a></li><li class="menu__list-item"><a class="menu__link" tabindex="0" href="/docs/next/easing">Easing</a></li><li class="menu__list-item"><a class="menu__link" tabindex="0" href="/docs/next/interactionmanager">InteractionManager</a></li><li class="menu__list-item"><a class="menu__link" tabindex="0" href="/docs/next/keyboard">Keyboard</a></li><li class="menu__list-item"><a class="menu__link" tabindex="0" href="/docs/next/layoutanimation">LayoutAnimation</a></li><li class="menu__list-item"><a class="menu__link" tabindex="0" href="/docs/next/linking">Linking</a></li><li class="menu__list-item"><a class="menu__link" tabindex="0" href="/docs/next/panresponder">PanResponder</a></li><li class="menu__list-item"><a class="menu__link" tabindex="0" href="/docs/next/pixelratio">PixelRatio</a></li><li class="menu__list-item"><a class="menu__link" tabindex="0" href="/docs/next/platform">Platform</a></li><li class="menu__list-item"><a class="menu__link" tabindex="0" href="/docs/next/platformcolor">PlatformColor</a></li><li class="menu__list-item"><a class="menu__link" tabindex="0" href="/docs/next/share">Share</a></li><li class="menu__list-item"><a class="menu__link" tabindex="0" href="/docs/next/stylesheet">StyleSheet</a></li><li class="menu__list-item"><a class="menu__link" tabindex="0" href="/docs/next/systrace">Systrace</a></li><li class="menu__list-item"><a class="menu__link" tabindex="0" href="/docs/next/transforms">Transforms</a></li><li class="menu__list-item"><a class="menu__link" tabindex="0" href="/docs/next/vibration">Vibration</a></li><li class="menu__list-item"><a class="menu__link menu__link--sublist" href="#!" tabindex="0">Hooks</a><ul class="menu__list"><li class="menu__list-item"><a class="menu__link" tabindex="0" href="/docs/next/usecolorscheme">useColorScheme</a></li><li class="menu__list-item"><a class="menu__link" tabindex="0" href="/docs/next/usewindowdimensions">useWindowDimensions</a></li></ul></li><li class="menu__list-item"><a class="menu__link menu__link--sublist" href="#!" tabindex="0">Android APIs</a><ul class="menu__list"><li class="menu__list-item"><a class="menu__link" tabindex="0" href="/docs/next/backhandler">BackHandler</a></li><li class="menu__list-item"><a class="menu__link" tabindex="0" href="/docs/next/permissionsandroid">PermissionsAndroid</a></li><li class="menu__list-item"><a class="menu__link" tabindex="0" href="/docs/next/toastandroid">ToastAndroid</a></li></ul></li><li class="menu__list-item"><a class="menu__link menu__link--sublist" href="#!" tabindex="0">iOS APIs</a><ul class="menu__list"><li class="menu__list-item"><a class="menu__link" tabindex="0" href="/docs/next/actionsheetios">ActionSheetIOS</a></li><li class="menu__list-item"><a class="menu__link" tabindex="0" href="/docs/next/dynamiccolorios">DynamicColorIOS</a></li><li class="menu__list-item"><a class="menu__link" tabindex="0" href="/docs/next/settings">Settings</a></li></ul></li></ul></li></ul></div></div></div><main class="docMainContainer_1rYT"><div class="container padding-vert--lg docItemWrapper_1Hme"><div class="row"><div class="col docItemCol_2AGf"><div class="alert alert--warning margin-bottom--md" role="alert"><div>This is unreleased documentation for React Native <strong>Next</strong> version.</div><div class="margin-top--md">For up-to-date documentation, see the <strong><a href="/docs/appregistry">latest version</a></strong> (0.63).</div></div><div class="docItemContainer_1tAC"><article><div><span class="badge badge--secondary">Version: Next</span></div><header><h1 class="docTitle_cWlf">AppRegistry</h1></header><div class="markdown"><div class="banner-native-code-required"><h3>Project with Native Code Required</h3><p>If you are using the managed <code>expo-cli</code> workflow there is only ever one entry component registered with <code>AppRegistry</code> and it is handled automatically, you do not need to use this API.</p></div><p><code>AppRegistry</code> is the JS entry point to running all React Native apps. App root components should register themselves with <code>AppRegistry.registerComponent</code>, then the native system can load the bundle for the app and then actually run the app when it&#x27;s ready by invoking <code>AppRegistry.runApplication</code>.</p><div class="mdxCodeBlock_xYIz"><div class="codeBlockContent_rlEb"><button tabindex="0" type="button" aria-label="Copy code to clipboard" class="copyButton_kOW4">Copy</button><div class="prism-code language-jsx codeBlock_1AP7"><div class="codeBlockLines_1boI" style="color:#FFFFFF;background:#282C34"><div class="token-line" style="color:#FFFFFF;background:#282C34"><span class="token keyword" style="color:#c5a5c5">import</span><span class="token plain"> </span><span class="token punctuation" style="color:#657b83">{</span><span class="token plain"> Text</span><span class="token punctuation" style="color:#657b83">,</span><span class="token plain"> AppRegistry </span><span class="token punctuation" style="color:#657b83">}</span><span class="token plain"> </span><span class="token keyword" style="color:#c5a5c5">from</span><span class="token plain"> </span><span class="token string" style="color:#8dc891">&#x27;react-native&#x27;</span><span class="token punctuation" style="color:#657b83">;</span><span class="token plain"></span></div><div class="token-line" style="color:#FFFFFF;background:#282C34"><span class="token plain" style="display:inline-block">
</span></div><div class="token-line" style="color:#FFFFFF;background:#282C34"><span class="token plain"></span><span class="token keyword" style="color:#c5a5c5">const</span><span class="token plain"> </span><span class="token function-variable function" style="color:#79b6f2">App</span><span class="token plain"> </span><span class="token operator" style="color:#fc929e">=</span><span class="token plain"> </span><span class="token punctuation" style="color:#657b83">(</span><span class="token parameter">props</span><span class="token punctuation" style="color:#657b83">)</span><span class="token plain"> </span><span class="token operator" style="color:#fc929e">=&gt;</span><span class="token plain"> </span><span class="token punctuation" style="color:#657b83">(</span><span class="token plain"></span></div><div class="token-line" style="color:#FFFFFF;background:#282C34"><span class="token plain"> </span><span class="token tag punctuation" style="color:#657b83">&lt;</span><span class="token tag class-name" style="color:#fac863">View</span><span class="token tag punctuation" style="color:#657b83">&gt;</span><span class="token plain"></span></div><div class="token-line" style="color:#FFFFFF;background:#282C34"><span class="token plain"> </span><span class="token tag punctuation" style="color:#657b83">&lt;</span><span class="token tag class-name" style="color:#fac863">Text</span><span class="token tag punctuation" style="color:#657b83">&gt;</span><span class="token plain">App1</span><span class="token tag punctuation" style="color:#657b83">&lt;/</span><span class="token tag class-name" style="color:#fac863">Text</span><span class="token tag punctuation" style="color:#657b83">&gt;</span><span class="token plain"></span></div><div class="token-line" style="color:#FFFFFF;background:#282C34"><span class="token plain"> </span><span class="token tag punctuation" style="color:#657b83">&lt;/</span><span class="token tag class-name" style="color:#fac863">View</span><span class="token tag punctuation" style="color:#657b83">&gt;</span><span class="token plain"></span></div><div class="token-line" style="color:#FFFFFF;background:#282C34"><span class="token plain"></span><span class="token punctuation" style="color:#657b83">)</span><span class="token punctuation" style="color:#657b83">;</span><span class="token plain"></span></div><div class="token-line" style="color:#FFFFFF;background:#282C34"><span class="token plain" style="display:inline-block">
</span></div><div class="token-line" style="color:#FFFFFF;background:#282C34"><span class="token plain">AppRegistry</span><span class="token punctuation" style="color:#657b83">.</span><span class="token function" style="color:#79b6f2">registerComponent</span><span class="token punctuation" style="color:#657b83">(</span><span class="token string" style="color:#8dc891">&#x27;Appname&#x27;</span><span class="token punctuation" style="color:#657b83">,</span><span class="token plain"> </span><span class="token punctuation" style="color:#657b83">(</span><span class="token punctuation" style="color:#657b83">)</span><span class="token plain"> </span><span class="token operator" style="color:#fc929e">=&gt;</span><span class="token plain"> App</span><span class="token punctuation" style="color:#657b83">)</span><span class="token punctuation" style="color:#657b83">;</span></div></div></div></div></div><p>To &quot;stop&quot; an application when a view should be destroyed, call <code>AppRegistry.unmountApplicationComponentAtRootTag</code> with the tag that was passed into <code>runApplication</code>. These should always be used as a pair.</p><p><code>AppRegistry</code> should be required early in the <code>require</code> sequence to make sure the JS execution environment is setup before other modules are required.</p><hr><h1><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_3pqN" id="reference"></a>Reference<a aria-hidden="true" tabindex="-1" class="hash-link" href="#reference" title="Direct link to heading">#</a></h1><h2><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_3pqN" id="methods"></a>Methods<a aria-hidden="true" tabindex="-1" class="hash-link" href="#methods" title="Direct link to heading">#</a></h2><h3><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_3pqN" id="cancelheadlesstask"></a><code>cancelHeadlessTask()</code><a aria-hidden="true" tabindex="-1" class="hash-link" href="#cancelheadlesstask" title="Direct link to heading">#</a></h3><div class="mdxCodeBlock_xYIz"><div class="codeBlockContent_rlEb"><button tabindex="0" type="button" aria-label="Copy code to clipboard" class="copyButton_kOW4">Copy</button><div class="prism-code language-jsx codeBlock_1AP7"><div class="codeBlockLines_1boI" style="color:#FFFFFF;background:#282C34"><div class="token-line" style="color:#FFFFFF;background:#282C34"><span class="token keyword" style="color:#c5a5c5">static</span><span class="token plain"> </span><span class="token function" style="color:#79b6f2">cancelHeadlessTask</span><span class="token punctuation" style="color:#657b83">(</span><span class="token plain">taskId</span><span class="token punctuation" style="color:#657b83">,</span><span class="token plain"> taskKey</span><span class="token punctuation" style="color:#657b83">)</span></div></div></div></div></div><p>Only called from native code. Cancels a headless task.</p><p><strong>Parameters:</strong></p><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>taskId <div class="label basic required">Required</div></td><td>number</td><td>The native id for this task instance that was used when <code>startHeadlessTask</code> was called.</td></tr><tr><td>taskKey <div class="label basic required">Required</div></td><td>string</td><td>The key for the task that was used when <code>startHeadlessTask</code> was called.</td></tr></tbody></table><hr><h3><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_3pqN" id="enablearchitectureindicator"></a><code>enableArchitectureIndicator()</code><a aria-hidden="true" tabindex="-1" class="hash-link" href="#enablearchitectureindicator" title="Direct link to heading">#</a></h3><div class="mdxCodeBlock_xYIz"><div class="codeBlockContent_rlEb"><button tabindex="0" type="button" aria-label="Copy code to clipboard" class="copyButton_kOW4">Copy</button><div class="prism-code language-jsx codeBlock_1AP7"><div class="codeBlockLines_1boI" style="color:#FFFFFF;background:#282C34"><div class="token-line" style="color:#FFFFFF;background:#282C34"><span class="token keyword" style="color:#c5a5c5">static</span><span class="token plain"> </span><span class="token function" style="color:#79b6f2">enableArchitectureIndicator</span><span class="token punctuation" style="color:#657b83">(</span><span class="token plain">enabled</span><span class="token punctuation" style="color:#657b83">)</span></div></div></div></div></div><p><strong>Parameters:</strong></p><table><thead><tr><th>Name</th><th>Type</th></tr></thead><tbody><tr><td>enabled <div class="label basic required">Required</div></td><td>boolean</td></tr></tbody></table><hr><h3><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_3pqN" id="getappkeys"></a><code>getAppKeys()</code><a aria-hidden="true" tabindex="-1" class="hash-link" href="#getappkeys" title="Direct link to heading">#</a></h3><div class="mdxCodeBlock_xYIz"><div class="codeBlockContent_rlEb"><button tabindex="0" type="button" aria-label="Copy code to clipboard" class="copyButton_kOW4">Copy</button><div class="prism-code language-jsx codeBlock_1AP7"><div class="codeBlockLines_1boI" style="color:#FFFFFF;background:#282C34"><div class="token-line" style="color:#FFFFFF;background:#282C34"><span class="token keyword" style="color:#c5a5c5">static</span><span class="token plain"> </span><span class="token function" style="color:#79b6f2">getAppKeys</span><span class="token punctuation" style="color:#657b83">(</span><span class="token punctuation" style="color:#657b83">)</span></div></div></div></div></div><p>Returns an array of strings.</p><hr><h3><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_3pqN" id="getregistry"></a><code>getRegistry()</code><a aria-hidden="true" tabindex="-1" class="hash-link" href="#getregistry" title="Direct link to heading">#</a></h3><div class="mdxCodeBlock_xYIz"><div class="codeBlockContent_rlEb"><button tabindex="0" type="button" aria-label="Copy code to clipboard" class="copyButton_kOW4">Copy</button><div class="prism-code language-jsx codeBlock_1AP7"><div class="codeBlockLines_1boI" style="color:#FFFFFF;background:#282C34"><div class="token-line" style="color:#FFFFFF;background:#282C34"><span class="token keyword" style="color:#c5a5c5">static</span><span class="token plain"> </span><span class="token function" style="color:#79b6f2">getRegistry</span><span class="token punctuation" style="color:#657b83">(</span><span class="token punctuation" style="color:#657b83">)</span></div></div></div></div></div><p>Returns a <a href="/docs/next/appregistry#registry">Registry</a> object.</p><hr><h3><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_3pqN" id="getrunnable"></a><code>getRunnable()</code><a aria-hidden="true" tabindex="-1" class="hash-link" href="#getrunnable" title="Direct link to heading">#</a></h3><div class="mdxCodeBlock_xYIz"><div class="codeBlockContent_rlEb"><button tabindex="0" type="button" aria-label="Copy code to clipboard" class="copyButton_kOW4">Copy</button><div class="prism-code language-jsx codeBlock_1AP7"><div class="codeBlockLines_1boI" style="color:#FFFFFF;background:#282C34"><div class="token-line" style="color:#FFFFFF;background:#282C34"><span class="token keyword" style="color:#c5a5c5">static</span><span class="token plain"> </span><span class="token function" style="color:#79b6f2">getRunnable</span><span class="token punctuation" style="color:#657b83">(</span><span class="token plain">appKey</span><span class="token punctuation" style="color:#657b83">)</span></div></div></div></div></div><p>Returns a <a href="/docs/next/appregistry#runnable">Runnable</a> object.</p><p><strong>Parameters:</strong></p><table><thead><tr><th>Name</th><th>Type</th></tr></thead><tbody><tr><td>appKey <div class="label basic required">Required</div></td><td>string</td></tr></tbody></table><hr><h3><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_3pqN" id="getsectionkeys"></a><code>getSectionKeys()</code><a aria-hidden="true" tabindex="-1" class="hash-link" href="#getsectionkeys" title="Direct link to heading">#</a></h3><div class="mdxCodeBlock_xYIz"><div class="codeBlockContent_rlEb"><button tabindex="0" type="button" aria-label="Copy code to clipboard" class="copyButton_kOW4">Copy</button><div class="prism-code language-jsx codeBlock_1AP7"><div class="codeBlockLines_1boI" style="color:#FFFFFF;background:#282C34"><div class="token-line" style="color:#FFFFFF;background:#282C34"><span class="token keyword" style="color:#c5a5c5">static</span><span class="token plain"> </span><span class="token function" style="color:#79b6f2">getSectionKeys</span><span class="token punctuation" style="color:#657b83">(</span><span class="token punctuation" style="color:#657b83">)</span></div></div></div></div></div><p>Returns an array of strings.</p><hr><h3><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_3pqN" id="getsections"></a><code>getSections()</code><a aria-hidden="true" tabindex="-1" class="hash-link" href="#getsections" title="Direct link to heading">#</a></h3><div class="mdxCodeBlock_xYIz"><div class="codeBlockContent_rlEb"><button tabindex="0" type="button" aria-label="Copy code to clipboard" class="copyButton_kOW4">Copy</button><div class="prism-code language-jsx codeBlock_1AP7"><div class="codeBlockLines_1boI" style="color:#FFFFFF;background:#282C34"><div class="token-line" style="color:#FFFFFF;background:#282C34"><span class="token keyword" style="color:#c5a5c5">static</span><span class="token plain"> </span><span class="token function" style="color:#79b6f2">getSections</span><span class="token punctuation" style="color:#657b83">(</span><span class="token punctuation" style="color:#657b83">)</span></div></div></div></div></div><p>Returns a <a href="/docs/next/appregistry#runnables">Runnables</a> object.</p><hr><h3><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_3pqN" id="registercancellableheadlesstask"></a><code>registerCancellableHeadlessTask()</code><a aria-hidden="true" tabindex="-1" class="hash-link" href="#registercancellableheadlesstask" title="Direct link to heading">#</a></h3><div class="mdxCodeBlock_xYIz"><div class="codeBlockContent_rlEb"><button tabindex="0" type="button" aria-label="Copy code to clipboard" class="copyButton_kOW4">Copy</button><div class="prism-code language-jsx codeBlock_1AP7"><div class="codeBlockLines_1boI" style="color:#FFFFFF;background:#282C34"><div class="token-line" style="color:#FFFFFF;background:#282C34"><span class="token keyword" style="color:#c5a5c5">static</span><span class="token plain"> </span><span class="token function" style="color:#79b6f2">registerCancellableHeadlessTask</span><span class="token punctuation" style="color:#657b83">(</span><span class="token plain">taskKey</span><span class="token punctuation" style="color:#657b83">,</span><span class="token plain"> taskProvider</span><span class="token punctuation" style="color:#657b83">,</span><span class="token plain"> taskCancelProvider</span><span class="token punctuation" style="color:#657b83">)</span></div></div></div></div></div><p>Register a headless task which can be cancelled. A headless task is a bit of code that runs without a UI.</p><p><strong>Parameters:</strong></p><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>taskKey<br><div class="label basic required two-lines">Required</div></td><td>string</td><td>The native id for this task instance that was used when startHeadlessTask was called.</td></tr><tr><td>taskProvider<br><div class="label basic required two-lines">Required</div></td><td><a href="/docs/next/appregistry#taskprovider">TaskProvider</a></td><td>A promise returning function that takes some data passed from the native side as the only argument. When the promise is resolved or rejected the native side is notified of this event and it may decide to destroy the JS context.</td></tr><tr><td>taskCancelProvider<br><div class="label basic required two-lines">Required</div></td><td><a href="/docs/next/appregistry#taskcancelprovider">TaskCancelProvider</a></td><td>a void returning function that takes no arguments; when a cancellation is requested, the function being executed by taskProvider should wrap up and return ASAP.</td></tr></tbody></table><hr><h3><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_3pqN" id="registercomponent"></a><code>registerComponent()</code><a aria-hidden="true" tabindex="-1" class="hash-link" href="#registercomponent" title="Direct link to heading">#</a></h3><div class="mdxCodeBlock_xYIz"><div class="codeBlockContent_rlEb"><button tabindex="0" type="button" aria-label="Copy code to clipboard" class="copyButton_kOW4">Copy</button><div class="prism-code language-jsx codeBlock_1AP7"><div class="codeBlockLines_1boI" style="color:#FFFFFF;background:#282C34"><div class="token-line" style="color:#FFFFFF;background:#282C34"><span class="token keyword" style="color:#c5a5c5">static</span><span class="token plain"> </span><span class="token function" style="color:#79b6f2">registerComponent</span><span class="token punctuation" style="color:#657b83">(</span><span class="token plain">appKey</span><span class="token punctuation" style="color:#657b83">,</span><span class="token plain"> componentProvider</span><span class="token punctuation" style="color:#657b83">,</span><span class="token plain"> section</span><span class="token operator" style="color:#fc929e">?</span><span class="token punctuation" style="color:#657b83">)</span></div></div></div></div></div><p><strong>Parameters:</strong></p><table><thead><tr><th>Name</th><th>Type</th></tr></thead><tbody><tr><td>appKey <div class="label basic required">Required</div></td><td>string</td></tr><tr><td>componentProvider <div class="label basic required">Required</div></td><td>ComponentProvider</td></tr><tr><td>section</td><td>boolean</td></tr></tbody></table><hr><h3><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_3pqN" id="registerconfig"></a><code>registerConfig()</code><a aria-hidden="true" tabindex="-1" class="hash-link" href="#registerconfig" title="Direct link to heading">#</a></h3><div class="mdxCodeBlock_xYIz"><div class="codeBlockContent_rlEb"><button tabindex="0" type="button" aria-label="Copy code to clipboard" class="copyButton_kOW4">Copy</button><div class="prism-code language-jsx codeBlock_1AP7"><div class="codeBlockLines_1boI" style="color:#FFFFFF;background:#282C34"><div class="token-line" style="color:#FFFFFF;background:#282C34"><span class="token keyword" style="color:#c5a5c5">static</span><span class="token plain"> </span><span class="token function" style="color:#79b6f2">registerConfig</span><span class="token punctuation" style="color:#657b83">(</span><span class="token plain">config</span><span class="token punctuation" style="color:#657b83">)</span></div></div></div></div></div><p><strong>Parameters:</strong></p><table><thead><tr><th>Name</th><th>Type</th></tr></thead><tbody><tr><td>config <div class="label basic required">Required</div></td><td><a href="/docs/next/appregistry#appconfig">AppConfig</a></td></tr></tbody></table><hr><h3><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_3pqN" id="registerheadlesstask"></a><code>registerHeadlessTask()</code><a aria-hidden="true" tabindex="-1" class="hash-link" href="#registerheadlesstask" title="Direct link to heading">#</a></h3><div class="mdxCodeBlock_xYIz"><div class="codeBlockContent_rlEb"><button tabindex="0" type="button" aria-label="Copy code to clipboard" class="copyButton_kOW4">Copy</button><div class="prism-code language-jsx codeBlock_1AP7"><div class="codeBlockLines_1boI" style="color:#FFFFFF;background:#282C34"><div class="token-line" style="color:#FFFFFF;background:#282C34"><span class="token keyword" style="color:#c5a5c5">static</span><span class="token plain"> </span><span class="token function" style="color:#79b6f2">registerHeadlessTask</span><span class="token punctuation" style="color:#657b83">(</span><span class="token plain">taskKey</span><span class="token punctuation" style="color:#657b83">,</span><span class="token plain"> taskProvider</span><span class="token punctuation" style="color:#657b83">)</span></div></div></div></div></div><p>Register a headless task. A headless task is a bit of code that runs without a UI.</p><p>This is a way to run tasks in JavaScript while your app is in the background. It can be used, for example, to sync fresh data, handle push notifications, or play music.</p><p><strong>Parameters:</strong></p><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>taskKey <div class="label basic required two-lines">Required</div></td><td>string</td><td>The native id for this task instance that was used when startHeadlessTask was called.</td></tr><tr><td>taskProvider <div class="label basic required two-lines">Required</div></td><td><a href="/docs/next/appregistry#taskprovider">TaskProvider</a></td><td>A promise returning function that takes some data passed from the native side as the only argument. When the promise is resolved or rejected the native side is notified of this event and it may decide to destroy the JS context.</td></tr></tbody></table><hr><h3><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_3pqN" id="registerrunnable"></a><code>registerRunnable()</code><a aria-hidden="true" tabindex="-1" class="hash-link" href="#registerrunnable" title="Direct link to heading">#</a></h3><div class="mdxCodeBlock_xYIz"><div class="codeBlockContent_rlEb"><button tabindex="0" type="button" aria-label="Copy code to clipboard" class="copyButton_kOW4">Copy</button><div class="prism-code language-jsx codeBlock_1AP7"><div class="codeBlockLines_1boI" style="color:#FFFFFF;background:#282C34"><div class="token-line" style="color:#FFFFFF;background:#282C34"><span class="token keyword" style="color:#c5a5c5">static</span><span class="token plain"> </span><span class="token function" style="color:#79b6f2">registerRunnable</span><span class="token punctuation" style="color:#657b83">(</span><span class="token plain">appKey</span><span class="token punctuation" style="color:#657b83">,</span><span class="token plain"> run</span><span class="token punctuation" style="color:#657b83">)</span></div></div></div></div></div><p><strong>Parameters:</strong></p><table><thead><tr><th>Name</th><th>Type</th></tr></thead><tbody><tr><td>appKey <div class="label basic required">Required</div></td><td>string</td></tr><tr><td>run <div class="label basic required">Required</div></td><td>function</td></tr></tbody></table><hr><h3><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_3pqN" id="registersection"></a><code>registerSection()</code><a aria-hidden="true" tabindex="-1" class="hash-link" href="#registersection" title="Direct link to heading">#</a></h3><div class="mdxCodeBlock_xYIz"><div class="codeBlockContent_rlEb"><button tabindex="0" type="button" aria-label="Copy code to clipboard" class="copyButton_kOW4">Copy</button><div class="prism-code language-jsx codeBlock_1AP7"><div class="codeBlockLines_1boI" style="color:#FFFFFF;background:#282C34"><div class="token-line" style="color:#FFFFFF;background:#282C34"><span class="token keyword" style="color:#c5a5c5">static</span><span class="token plain"> </span><span class="token function" style="color:#79b6f2">registerSection</span><span class="token punctuation" style="color:#657b83">(</span><span class="token plain">appKey</span><span class="token punctuation" style="color:#657b83">,</span><span class="token plain"> component</span><span class="token punctuation" style="color:#657b83">)</span></div></div></div></div></div><p><strong>Parameters:</strong></p><table><thead><tr><th>Name</th><th>Type</th></tr></thead><tbody><tr><td>appKey <div class="label basic required">Required</div></td><td>string</td></tr><tr><td>component <div class="label basic required">Required</div></td><td>ComponentProvider</td></tr></tbody></table><hr><h3><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_3pqN" id="runapplication"></a><code>runApplication()</code><a aria-hidden="true" tabindex="-1" class="hash-link" href="#runapplication" title="Direct link to heading">#</a></h3><div class="mdxCodeBlock_xYIz"><div class="codeBlockContent_rlEb"><button tabindex="0" type="button" aria-label="Copy code to clipboard" class="copyButton_kOW4">Copy</button><div class="prism-code language-jsx codeBlock_1AP7"><div class="codeBlockLines_1boI" style="color:#FFFFFF;background:#282C34"><div class="token-line" style="color:#FFFFFF;background:#282C34"><span class="token keyword" style="color:#c5a5c5">static</span><span class="token plain"> </span><span class="token function" style="color:#79b6f2">runApplication</span><span class="token punctuation" style="color:#657b83">(</span><span class="token plain">appKey</span><span class="token punctuation" style="color:#657b83">,</span><span class="token plain"> appParameters</span><span class="token punctuation" style="color:#657b83">)</span></div></div></div></div></div><p>Loads the JavaScript bundle and runs the app.</p><p><strong>Parameters:</strong></p><table><thead><tr><th>Name</th><th>Type</th></tr></thead><tbody><tr><td>appKey <div class="label basic required">Required</div></td><td>string</td></tr><tr><td>appParameters <div class="label basic required">Required</div></td><td>any</td></tr></tbody></table><hr><h3><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_3pqN" id="setcomponentproviderinstrumentationhook"></a><code>setComponentProviderInstrumentationHook()</code><a aria-hidden="true" tabindex="-1" class="hash-link" href="#setcomponentproviderinstrumentationhook" title="Direct link to heading">#</a></h3><div class="mdxCodeBlock_xYIz"><div class="codeBlockContent_rlEb"><button tabindex="0" type="button" aria-label="Copy code to clipboard" class="copyButton_kOW4">Copy</button><div class="prism-code language-jsx codeBlock_1AP7"><div class="codeBlockLines_1boI" style="color:#FFFFFF;background:#282C34"><div class="token-line" style="color:#FFFFFF;background:#282C34"><span class="token keyword" style="color:#c5a5c5">static</span><span class="token plain"> </span><span class="token function" style="color:#79b6f2">setComponentProviderInstrumentationHook</span><span class="token punctuation" style="color:#657b83">(</span><span class="token plain">hook</span><span class="token punctuation" style="color:#657b83">)</span></div></div></div></div></div><p><strong>Parameters:</strong></p><table><thead><tr><th>Name</th><th>Type</th></tr></thead><tbody><tr><td>hook <div class="label basic required">Required</div></td><td>function</td></tr></tbody></table><p>A valid <code>hook</code> function accepts the following as arguments:</p><table><thead><tr><th>Name</th><th>Type</th></tr></thead><tbody><tr><td>component <div class="label basic required">Required</div></td><td>ComponentProvider</td></tr><tr><td>scopedPerformanceLogger <div class="label basic required">Required</div></td><td>IPerformanceLogger</td></tr></tbody></table><p>The function must also return a React Component.</p><hr><h3><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_3pqN" id="setwrappercomponentprovider"></a><code>setWrapperComponentProvider()</code><a aria-hidden="true" tabindex="-1" class="hash-link" href="#setwrappercomponentprovider" title="Direct link to heading">#</a></h3><div class="mdxCodeBlock_xYIz"><div class="codeBlockContent_rlEb"><button tabindex="0" type="button" aria-label="Copy code to clipboard" class="copyButton_kOW4">Copy</button><div class="prism-code language-jsx codeBlock_1AP7"><div class="codeBlockLines_1boI" style="color:#FFFFFF;background:#282C34"><div class="token-line" style="color:#FFFFFF;background:#282C34"><span class="token keyword" style="color:#c5a5c5">static</span><span class="token plain"> </span><span class="token function" style="color:#79b6f2">setWrapperComponentProvider</span><span class="token punctuation" style="color:#657b83">(</span><span class="token plain">provider</span><span class="token punctuation" style="color:#657b83">)</span></div></div></div></div></div><p><strong>Parameters:</strong></p><table><thead><tr><th>Name</th><th>Type</th></tr></thead><tbody><tr><td>provider <div class="label basic required">Required</div></td><td>ComponentProvider</td></tr></tbody></table><hr><h3><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_3pqN" id="startheadlesstask"></a><code>startHeadlessTask()</code><a aria-hidden="true" tabindex="-1" class="hash-link" href="#startheadlesstask" title="Direct link to heading">#</a></h3><div class="mdxCodeBlock_xYIz"><div class="codeBlockContent_rlEb"><button tabindex="0" type="button" aria-label="Copy code to clipboard" class="copyButton_kOW4">Copy</button><div class="prism-code language-jsx codeBlock_1AP7"><div class="codeBlockLines_1boI" style="color:#FFFFFF;background:#282C34"><div class="token-line" style="color:#FFFFFF;background:#282C34"><span class="token keyword" style="color:#c5a5c5">static</span><span class="token plain"> </span><span class="token function" style="color:#79b6f2">startHeadlessTask</span><span class="token punctuation" style="color:#657b83">(</span><span class="token plain">taskId</span><span class="token punctuation" style="color:#657b83">,</span><span class="token plain"> taskKey</span><span class="token punctuation" style="color:#657b83">,</span><span class="token plain"> data</span><span class="token punctuation" style="color:#657b83">)</span></div></div></div></div></div><p>Only called from native code. Starts a headless task.</p><p><strong>Parameters:</strong></p><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>taskId <div class="label basic required">Required</div></td><td>number</td><td>The native id for this task instance to keep track of its execution.</td></tr><tr><td>taskKey <div class="label basic required">Required</div></td><td>string</td><td>The key for the task to start.</td></tr><tr><td>data <div class="label basic required">Required</div></td><td>any</td><td>The data to pass to the task.</td></tr></tbody></table><hr><h3><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_3pqN" id="unmountapplicationcomponentatroottag"></a><code>unmountApplicationComponentAtRootTag()</code><a aria-hidden="true" tabindex="-1" class="hash-link" href="#unmountapplicationcomponentatroottag" title="Direct link to heading">#</a></h3><div class="mdxCodeBlock_xYIz"><div class="codeBlockContent_rlEb"><button tabindex="0" type="button" aria-label="Copy code to clipboard" class="copyButton_kOW4">Copy</button><div class="prism-code language-jsx codeBlock_1AP7"><div class="codeBlockLines_1boI" style="color:#FFFFFF;background:#282C34"><div class="token-line" style="color:#FFFFFF;background:#282C34"><span class="token keyword" style="color:#c5a5c5">static</span><span class="token plain"> </span><span class="token function" style="color:#79b6f2">unmountApplicationComponentAtRootTag</span><span class="token punctuation" style="color:#657b83">(</span><span class="token plain">rootTag</span><span class="token punctuation" style="color:#657b83">)</span></div></div></div></div></div><p>Stops an application when a view should be destroyed.</p><p><strong>Parameters:</strong></p><table><thead><tr><th>Name</th><th>Type</th></tr></thead><tbody><tr><td>rootTag <div class="label basic required">Required</div></td><td>number</td></tr></tbody></table><h2><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_3pqN" id="type-definitions"></a>Type Definitions<a aria-hidden="true" tabindex="-1" class="hash-link" href="#type-definitions" title="Direct link to heading">#</a></h2><h3><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_3pqN" id="appconfig"></a>AppConfig<a aria-hidden="true" tabindex="-1" class="hash-link" href="#appconfig" title="Direct link to heading">#</a></h3><p>Application configuration for the <code>registerConfig</code> method.</p><table><thead><tr><th>Type</th></tr></thead><tbody><tr><td>object</td></tr></tbody></table><p><strong>Properties:</strong></p><table><thead><tr><th>Name</th><th>Type</th></tr></thead><tbody><tr><td>appKey <div class="label basic required">Required</div></td><td>string</td></tr><tr><td>component</td><td>ComponentProvider</td></tr><tr><td>run</td><td>function</td></tr><tr><td>section</td><td>boolean</td></tr></tbody></table><blockquote><p><strong>Note:</strong> Every config is expected to set either <code>component</code> or <code>run</code> function.</p></blockquote><h3><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_3pqN" id="registry"></a>Registry<a aria-hidden="true" tabindex="-1" class="hash-link" href="#registry" title="Direct link to heading">#</a></h3><table><thead><tr><th>Type</th></tr></thead><tbody><tr><td>object</td></tr></tbody></table><p><strong>Properties:</strong></p><table><thead><tr><th>Name</th><th>Type</th></tr></thead><tbody><tr><td>runnables</td><td>array of <a href="/docs/next/appregistry#runnable">Runnables</a></td></tr><tr><td>sections</td><td>array of strings</td></tr></tbody></table><h3><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_3pqN" id="runnable"></a>Runnable<a aria-hidden="true" tabindex="-1" class="hash-link" href="#runnable" title="Direct link to heading">#</a></h3><table><thead><tr><th>Type</th></tr></thead><tbody><tr><td>object</td></tr></tbody></table><p><strong>Properties:</strong></p><table><thead><tr><th>Name</th><th>Type</th></tr></thead><tbody><tr><td>component</td><td>ComponentProvider</td></tr><tr><td>run</td><td>function</td></tr></tbody></table><h3><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_3pqN" id="runnables"></a>Runnables<a aria-hidden="true" tabindex="-1" class="hash-link" href="#runnables" title="Direct link to heading">#</a></h3><p>An object with key of <code>appKey</code> and value of type of <a href="/docs/next/appregistry#runnable"><code>Runnable</code></a>.</p><table><thead><tr><th>Type</th></tr></thead><tbody><tr><td>object</td></tr></tbody></table><h3><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_3pqN" id="task"></a>Task<a aria-hidden="true" tabindex="-1" class="hash-link" href="#task" title="Direct link to heading">#</a></h3><p>A <code>Task</code> is a function that accepts any data as argument and returns a Promise that resolves to <code>undefined</code>.</p><table><thead><tr><th>Type</th></tr></thead><tbody><tr><td>function</td></tr></tbody></table><h3><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_3pqN" id="taskcanceller"></a>TaskCanceller<a aria-hidden="true" tabindex="-1" class="hash-link" href="#taskcanceller" title="Direct link to heading">#</a></h3><p>A <code>TaskCanceller</code> is a function that accepts no argument and returns void.</p><table><thead><tr><th>Type</th></tr></thead><tbody><tr><td>function</td></tr></tbody></table><h3><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_3pqN" id="taskcancelprovider"></a>TaskCancelProvider<a aria-hidden="true" tabindex="-1" class="hash-link" href="#taskcancelprovider" title="Direct link to heading">#</a></h3><p>A valid <code>TaskCancelProvider</code> is a function that returns a <a href="/docs/next/appregistry#taskcanceller"><code>TaskCanceller</code></a>.</p><table><thead><tr><th>Type</th></tr></thead><tbody><tr><td>function</td></tr></tbody></table><h3><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_3pqN" id="taskprovider"></a>TaskProvider<a aria-hidden="true" tabindex="-1" class="hash-link" href="#taskprovider" title="Direct link to heading">#</a></h3><p>A valid <code>TaskProvider</code> is a function that returns a <a href="/docs/next/appregistry#task"><code>Task</code></a>.</p><table><thead><tr><th>Type</th></tr></thead><tbody><tr><td>function</td></tr></tbody></table></div></article><div class="docMetadata margin-vert--xl"><div class="row"><div class="col"><a href="https://github.com/facebook/react-native-website/blob/master/website/../docs/appregistry.md" target="_blank" rel="noreferrer noopener"><svg fill="currentColor" height="1.2em" width="1.2em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 40 40" style="margin-right:0.3em;vertical-align:sub"><g><path d="m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"></path></g></svg>Edit this page</a></div><div class="col text--right"><em><small class="docMetadata-updated">Last updated on <time datetime="2020-12-07T15:59:34.000Z" class="docLastUpdatedAt_1gIo">12/7/2020</time></small></em></div></div></div><div class="margin-vert--lg"><nav class="pagination-nav" aria-label="Blog list page navigation"><div class="pagination-nav__item"><a class="pagination-nav__link" href="/docs/next/appearance"><div class="pagination-nav__sublabel">Previous</div><div class="pagination-nav__label">« Appearance</div></a></div><div class="pagination-nav__item pagination-nav__item--next"><a class="pagination-nav__link" href="/docs/next/appstate"><div class="pagination-nav__sublabel">Next</div><div class="pagination-nav__label">AppState »</div></a></div></nav></div></div></div><div class="col col--3"><div class="tableOfContents_3iuQ"><ul class="table-of-contents table-of-contents__left-border"><li><a href="#methods" class="table-of-contents__link">Methods</a><ul><li><a href="#cancelheadlesstask" class="table-of-contents__link"><code>cancelHeadlessTask()</code></a></li><li><a href="#enablearchitectureindicator" class="table-of-contents__link"><code>enableArchitectureIndicator()</code></a></li><li><a href="#getappkeys" class="table-of-contents__link"><code>getAppKeys()</code></a></li><li><a href="#getregistry" class="table-of-contents__link"><code>getRegistry()</code></a></li><li><a href="#getrunnable" class="table-of-contents__link"><code>getRunnable()</code></a></li><li><a href="#getsectionkeys" class="table-of-contents__link"><code>getSectionKeys()</code></a></li><li><a href="#getsections" class="table-of-contents__link"><code>getSections()</code></a></li><li><a href="#registercancellableheadlesstask" class="table-of-contents__link"><code>registerCancellableHeadlessTask()</code></a></li><li><a href="#registercomponent" class="table-of-contents__link"><code>registerComponent()</code></a></li><li><a href="#registerconfig" class="table-of-contents__link"><code>registerConfig()</code></a></li><li><a href="#registerheadlesstask" class="table-of-contents__link"><code>registerHeadlessTask()</code></a></li><li><a href="#registerrunnable" class="table-of-contents__link"><code>registerRunnable()</code></a></li><li><a href="#registersection" class="table-of-contents__link"><code>registerSection()</code></a></li><li><a href="#runapplication" class="table-of-contents__link"><code>runApplication()</code></a></li><li><a href="#setcomponentproviderinstrumentationhook" class="table-of-contents__link"><code>setComponentProviderInstrumentationHook()</code></a></li><li><a href="#setwrappercomponentprovider" class="table-of-contents__link"><code>setWrapperComponentProvider()</code></a></li><li><a href="#startheadlesstask" class="table-of-contents__link"><code>startHeadlessTask()</code></a></li><li><a href="#unmountapplicationcomponentatroottag" class="table-of-contents__link"><code>unmountApplicationComponentAtRootTag()</code></a></li></ul></li><li><a href="#type-definitions" class="table-of-contents__link">Type Definitions</a><ul><li><a href="#appconfig" class="table-of-contents__link">AppConfig</a></li><li><a href="#registry" class="table-of-contents__link">Registry</a></li><li><a href="#runnable" class="table-of-contents__link">Runnable</a></li><li><a href="#runnables" class="table-of-contents__link">Runnables</a></li><li><a href="#task" class="table-of-contents__link">Task</a></li><li><a href="#taskcanceller" class="table-of-contents__link">TaskCanceller</a></li><li><a href="#taskcancelprovider" class="table-of-contents__link">TaskCancelProvider</a></li><li><a href="#taskprovider" class="table-of-contents__link">TaskProvider</a></li></ul></li></ul></div></div></div></div></main></div></div><footer class="footer footer--dark"><div class="container"><div class="row footer__links"><div class="col footer__col"><h4 class="footer__title">Docs</h4><ul class="footer__items"><li class="footer__item"><a class="footer__link-item" href="/docs/getting-started">Getting Started</a></li><li class="footer__item"><a class="footer__link-item" href="/docs/tutorial">Tutorial</a></li><li class="footer__item"><a class="footer__link-item" href="/docs/components-and-apis">Components and APIs</a></li><li class="footer__item"><a class="footer__link-item" href="/docs/more-resources">More Resources</a></li></ul></div><div class="col footer__col"><h4 class="footer__title">Community</h4><ul class="footer__items"><li class="footer__item"><a class="footer__link-item" href="/help">The React Native Community</a></li><li class="footer__item"><a class="footer__link-item" href="/showcase">Who&#x27;s using React Native?</a></li><li class="footer__item"><a href="https://stackoverflow.com/questions/tagged/react-native" target="_blank" rel="noopener noreferrer" class="footer__link-item">Ask Questions on Stack Overflow</a></li><li class="footer__item"><a href="https://github.com/facebook/react-native/blob/master/CONTRIBUTING.md" target="_blank" rel="noopener noreferrer" class="footer__link-item">Contributor Guide</a></li><li class="footer__item"><a href="https://dev.to/t/reactnative" target="_blank" rel="noopener noreferrer" class="footer__link-item">DEV Community</a></li></ul></div><div class="col footer__col"><h4 class="footer__title">Find us</h4><ul class="footer__items"><li class="footer__item"><a class="footer__link-item" href="/blog">Blog</a></li><li class="footer__item"><a href="https://twitter.com/reactnative" target="_blank" rel="noopener noreferrer" class="footer__link-item">Twitter</a></li><li class="footer__item"><a href="https://github.com/facebook/react-native" target="_blank" rel="noopener noreferrer" class="footer__link-item">GitHub</a></li></ul></div><div class="col footer__col"><h4 class="footer__title">More</h4><ul class="footer__items"><li class="footer__item"><a href="https://reactjs.org/" target="_blank" rel="noopener noreferrer" class="footer__link-item">React</a></li><li class="footer__item"><a href="https://opensource.facebook.com/legal/privacy" target="_blank" rel="noopener noreferrer" class="footer__link-item">Privacy Policy</a></li><li class="footer__item"><a href="https://opensource.facebook.com/legal/terms" target="_blank" rel="noopener noreferrer" class="footer__link-item">Terms of Service</a></li></ul></div></div><div class="text--center"><div class="margin-bottom--sm"><a href="https://opensource.facebook.com" target="_blank" rel="noopener noreferrer" class="footerLogoLink_19Ac"><img class="footer__logo" alt="Facebook Open Source Logo" src="/img/oss_logo.png"></a></div><div>Copyright © 2020 Facebook, Inc.</div></div></div></footer></div>
<script src="/styles.07d522c6.js"></script>
<script src="/runtime~main.c0800141.js"></script>
<script src="/main.5a3c9855.js"></script>
<script src="/1.ba9ce8bd.js"></script>
<script src="/2.58cb5d3d.js"></script>
<script src="/1f391b9e.a824c215.js"></script>
<script src="/943.8b024446.js"></script>
<script src="/935f2afb.71a0a895.js"></script>
<script src="/17896441.0c201679.js"></script>
<script src="/512a65de.513fcc96.js"></script>
</body>
</html>