1"use strict";(self.webpackChunkreact_native_website=self.webpackChunkreact_native_website||[]).push([["1425"],{13067(e,t,n){n.r(t),n.d(t,{metadata:()=>s,default:()=>h,frontMatter:()=>r,contentTitle:()=>l,toc:()=>c,assets:()=>a});var s=JSON.parse('{"id":"devsettings","title":"DevSettings","description":"The DevSettings module exposes methods for customizing settings for developers in development.","source":"@site/../docs/devsettings.md","sourceDirName":".","slug":"/devsettings","permalink":"/docs/next/devsettings","draft":false,"unlisted":false,"editUrl":"[{\\"label\\":\\"Edit this page\\",\\"href\\":\\"https://github.com/facebook/react-native-website/edit/main/docs/devsettings.md\\"}]","tags":[],"version":"current","lastUpdatedAt":1681993433000,"frontMatter":{"id":"devsettings","title":"DevSettings"},"sidebar":"api","previous":{"title":"AppState","permalink":"/docs/next/appstate"},"next":{"title":"Dimensions","permalink":"/docs/next/dimensions"}}'),i=n(62540),d=n(43023);let r={id:"devsettings",title:"DevSettings"},l,a={},c=[{value:"Methods",id:"methods",level:2},{value:"<code>addMenuItem()</code>",id:"addmenuitem",level:3},{value:"<code>reload()</code>",id:"reload",level:3}];function o(e){let t={code:"code",h1:"h1",h2:"h2",h3:"h3",hr:"hr",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,d.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(t.p,{children:["The ",(0,i.jsx)(t.code,{children:"DevSettings"})," module exposes methods for customizing settings for developers in development."]}),"\n",(0,i.jsx)(t.hr,{}),"\n",(0,i.jsx)(t.h1,{id:"reference",children:"Reference"}),"\n",(0,i.jsx)(t.h2,{id:"methods",children:"Methods"}),"\n",(0,i.jsx)(t.h3,{id:"addmenuitem",children:(0,i.jsx)(t.code,{children:"addMenuItem()"})}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-tsx",metastring:'title="React TSX"',children:"static addMenuItem(title: string, handler: () => any);\n"})}),"\n",(0,i.jsx)(t.p,{children:"Add a custom menu item to the Dev Menu."}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.strong,{children:"Parameters:"})}),"\n",(0,i.jsxs)(t.table,{children:[(0,i.jsx)(t.thead,{children:(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.th,{children:"Name"}),(0,i.jsx)(t.th,{children:"Type"})]})}),(0,i.jsxs)(t.tbody,{children:[(0,i.jsxs)(t.tr,{children:[(0,i.jsxs)(t.td,{children:["title ",(0,i.jsx)("div",{className:"label basic required",children:"Required"})]}),(0,i.jsx)(t.td,{children:"string"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsxs)(t.td,{children:["handler ",(0,i.jsx)("div",{className:"label basic required",children:"Required"})]}),(0,i.jsx)(t.td,{children:"function"})]})]})]}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.strong,{children:"Example:"})}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-tsx",metastring:'title="React TSX"',children:"DevSettings.addMenuItem('Show Secret Dev Screen', () => {\n Alert.alert('Showing secret dev screen!');\n});\n"})}),"\n",(0,i.jsx)(t.hr,{}),"\n",(0,i.jsx)(t.h3,{id:"reload",children:(0,i.jsx)(t.code,{children:"reload()"})}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-tsx",metastring:'title="React TSX"',children:"static reload(reason?: string): void;\n"})}),"\n",(0,i.jsx)(t.p,{children:"Reload the application. Can be invoked directly or on user interaction."}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.strong,{children:"Example:"})}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-tsx",metastring:'title="React TSX"',children:'<Button title="Reload" onPress={() => DevSettings.reload()} />\n'})})]})}function h(e={}){let{wrapper:t}={...(0,d.R)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(o,{...e})}):o(e)}},43023(e,t,n){n.d(t,{R:()=>r,x:()=>l});var s=n(63696);let i={},d=s.createContext(i);function r(e){let t=s.useContext(d);return s.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function l(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:r(e.components),s.createElement(d.Provider,{value:t},e.children)}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.