0&&e[n-1]===t?e:e.concat(t)};function P(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&-1===t.indexOf(a)&&(n[a]=e[a]);return n}var z=function(e){function t(){for(var t=this,n=[],a=arguments.length;a--;)n[a]=arguments[a];e.apply(this,n),L(this,"getThemeDict",(function(e){if(void 0!==t.themeDict&&e.theme===t.prevTheme&&e.language===t.prevLanguage)return t.themeDict;t.prevTheme=e.theme,t.prevLanguage=e.language;var n=e.theme?function(e,t){var n=e.plain,a=Object.create(null),o=e.styles.reduce((function(e,n){var a=n.languages,o=n.style;return a&&!a.includes(t)||n.types.forEach((function(t){var n=j({},e[t],o);e[t]=n})),e}),a);return o.root=n,o.plain=j({},n,{backgroundColor:null}),o}(e.theme,e.language):void 0;return t.themeDict=n})),L(this,"getLineProps",(function(e){var n=e.key,a=e.className,o=e.style,r=j({},P(e,["key","className","style","line"]),{className:"token-line",style:void 0,key:void 0}),c=t.getThemeDict(t.props);return void 0!==c&&(r.style=c.plain),void 0!==o&&(r.style=void 0!==r.style?j({},r.style,o):o),void 0!==n&&(r.key=n),a&&(r.className+=" "+a),r})),L(this,"getStyleForToken",(function(e){var n=e.types,a=e.empty,o=n.length,r=t.getThemeDict(t.props);if(void 0!==r){if(1===o&&"plain"===n[0])return a?{display:"inline-block"}:void 0;if(1===o&&!a)return r[n[0]];var c=a?{display:"inline-block"}:{},l=n.map((function(e){return r[e]}));return Object.assign.apply(Object,[c].concat(l))}})),L(this,"getTokenProps",(function(e){var n=e.key,a=e.className,o=e.style,r=e.token,c=j({},P(e,["key","className","style","token"]),{className:"token "+r.types.join(" "),children:r.content,style:t.getStyleForToken(r),key:void 0});return void 0!==o&&(c.style=void 0!==c.style?j({},c.style,o):o),void 0!==n&&(c.key=n),a&&(c.className+=" "+a),c})),L(this,"tokenize",(function(e,t,n,a){var o={code:t,grammar:n,language:a,tokens:[]};e.hooks.run("before-tokenize",o);var r=o.tokens=e.tokenize(o.code,o.grammar,o.language);return e.hooks.run("after-tokenize",o),r}))}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.render=function(){var e=this.props,t=e.Prism,n=e.language,a=e.code,o=e.children,r=this.getThemeDict(this.props),c=t.languages[n];return o({tokens:function(e){for(var t=[[]],n=[e],a=[0],o=[e.length],r=0,c=0,l=[],i=[l];c>-1;){for(;(r=a[c]++)0?u:["plain"],s=m):(u=S(u,m.type),m.alias&&(u=S(u,m.alias)),s=m.content),"string"==typeof s){var d=s.split(x),p=d.length;l.push({types:u,content:d[0]});for(var f=1;fa.createElement("span",(0,r.Z)({key:t},l({token:e,key:t})))));return a.createElement("span",s,o?a.createElement(a.Fragment,null,a.createElement("span",{className:I.codeLineNumber}),a.createElement("span",{className:I.codeLineContent},u)):u,a.createElement("br",null))}var M=n(5999);const H={copyButtonCopied:"copyButtonCopied_obH4",copyButtonIcons:"copyButtonIcons_eSgA",copyButtonIcon:"copyButtonIcon_y97N",copyButtonSuccessIcon:"copyButtonSuccessIcon_LjdS"};function D(e){let{code:t,className:n}=e;const[o,r]=(0,a.useState)(!1),c=(0,a.useRef)(void 0),l=(0,a.useCallback)((()=>{!function(e,t){let{target:n=document.body}=void 0===t?{}:t;if("string"!=typeof e)throw new TypeError(`Expected parameter \`text\` to be a \`string\`, got \`${typeof e}\`.`);const a=document.createElement("textarea"),o=document.activeElement;a.value=e,a.setAttribute("readonly",""),a.style.contain="strict",a.style.position="absolute",a.style.left="-9999px",a.style.fontSize="12pt";const r=document.getSelection(),c=r.rangeCount>0&&r.getRangeAt(0);n.append(a),a.select(),a.selectionStart=0,a.selectionEnd=e.length;let l=!1;try{l=document.execCommand("copy")}catch{}a.remove(),c&&(r.removeAllRanges(),r.addRange(c)),o&&o.focus()}(t),r(!0),c.current=window.setTimeout((()=>{r(!1)}),1e3)}),[t]);return(0,a.useEffect)((()=>()=>window.clearTimeout(c.current)),[]),a.createElement("button",{type:"button","aria-label":o?(0,M.I)({id:"theme.CodeBlock.copied",message:"Copied",description:"The copied button label on code blocks"}):(0,M.I)({id:"theme.CodeBlock.copyButtonAriaLabel",message:"Copy code to clipboard",description:"The ARIA label for copy code blocks button"}),title:(0,M.I)({id:"theme.CodeBlock.copy",message:"Copy",description:"The copy button label on code blocks"}),className:(0,i.Z)("clean-btn",n,H.copyButton,o&&H.copyButtonCopied),onClick:l},a.createElement("span",{className:H.copyButtonIcons,"aria-hidden":"true"},a.createElement("svg",{className:H.copyButtonIcon,viewBox:"0 0 24 24"},a.createElement("path",{d:"M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"})),a.createElement("svg",{className:H.copyButtonSuccessIcon,viewBox:"0 0 24 24"},a.createElement("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"}))))}const V={wordWrapButtonIcon:"wordWrapButtonIcon_Bwma",wordWrapButtonEnabled:"wordWrapButtonEnabled_EoeP"};function R(e){let{className:t,onClick:n,isEnabled:o}=e;const r=(0,M.I)({id:"theme.CodeBlock.wordWrapToggle",message:"Toggle word wrap",description:"The title attribute for toggle word wrapping button of code block lines"});return a.createElement("button",{type:"button",onClick:n,className:(0,i.Z)("clean-btn",t,o&&V.wordWrapButtonEnabled),"aria-label":r,title:r},a.createElement("svg",{className:V.wordWrapButtonIcon,viewBox:"0 0 24 24","aria-hidden":"true"},a.createElement("path",{fill:"currentColor",d:"M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"})))}function $(e){let{children:t,className:n="",metastring:o,title:c,showLineNumbers:l,language:s}=e;const{prism:{defaultLanguage:d,magicComments:p}}=(0,u.L)(),f=s??function(e){const t=e.split(" ").find((e=>e.startsWith("language-")));return t?.replace(/language-/,"")}(n)??d,h=m(),y=function(){const[e,t]=(0,a.useState)(!1),[n,o]=(0,a.useState)(!1),r=(0,a.useRef)(null),c=(0,a.useCallback)((()=>{const n=r.current.querySelector("code");e?n.removeAttribute("style"):(n.style.whiteSpace="pre-wrap",n.style.overflowWrap="anywhere"),t((e=>!e))}),[r,e]),l=(0,a.useCallback)((()=>{const{scrollWidth:e,clientWidth:t}=r.current,n=e>t||r.current.querySelector("code").hasAttribute("style");o(n)}),[r]);return T(r,l),(0,a.useEffect)((()=>{l()}),[e,l]),(0,a.useEffect)((()=>(window.addEventListener("resize",l,{passive:!0}),()=>{window.removeEventListener("resize",l)})),[l]),{codeBlockRef:r,isEnabled:e,isCodeScrollable:n,toggle:c}}(),b=function(e){return e?.match(g)?.groups.title??""}(o)||c,{lineClassNames:E,code:C}=v(t,{metastring:o,language:f,magicComments:p}),w=l??function(e){return Boolean(e?.includes("showLineNumbers"))}(o);return a.createElement(k,{as:"div",className:(0,i.Z)(n,f&&!n.includes(`language-${f}`)&&`language-${f}`)},b&&a.createElement("div",{className:N.codeBlockTitle},b),a.createElement("div",{className:N.codeBlockContent},a.createElement(A,(0,r.Z)({},_,{theme:h,code:C,language:f??"text"}),(e=>{let{className:t,tokens:n,getLineProps:o,getTokenProps:r}=e;return a.createElement("pre",{tabIndex:0,ref:y.codeBlockRef,className:(0,i.Z)(t,N.codeBlock,"thin-scrollbar")},a.createElement("code",{className:(0,i.Z)(N.codeBlockLines,w&&N.codeBlockLinesWithNumbering)},n.map(((e,t)=>a.createElement(W,{key:t,line:e,getLineProps:o,getTokenProps:r,classNames:E[t],showLineNumbers:w})))))})),a.createElement("div",{className:N.buttonGroup},(y.isEnabled||y.isCodeScrollable)&&a.createElement(R,{className:N.codeButton,onClick:()=>y.toggle(),isEnabled:y.isEnabled}),a.createElement(D,{className:N.codeButton,code:C}))))}function F(e){let{children:t,...n}=e;const o=(0,l.Z)(),c=function(e){return a.Children.toArray(e).some((e=>(0,a.isValidElement)(e)))?e:Array.isArray(e)?e.join(""):e}(t),i="string"==typeof c?$:C;return a.createElement(i,(0,r.Z)({key:String(o)},n),c)}var q=n(9960);var G=n(6043);const U={details:"details_lb9f",isBrowser:"isBrowser_bmU9",collapsibleContent:"collapsibleContent_i85q"};function Q(e){return!!e&&("SUMMARY"===e.tagName||Q(e.parentElement))}function X(e,t){return!!e&&(e===t||X(e.parentElement,t))}function Y(e){let{summary:t,children:n,...o}=e;const c=(0,l.Z)(),s=(0,a.useRef)(null),{collapsed:u,setCollapsed:m}=(0,G.u)({initialState:!o.open}),[d,p]=(0,a.useState)(o.open),f=a.isValidElement(t)?t:a.createElement("summary",null,t??"Details");return a.createElement("details",(0,r.Z)({},o,{ref:s,open:d,"data-collapsed":u,className:(0,i.Z)(U.details,c&&U.isBrowser,o.className),onMouseDown:e=>{Q(e.target)&&e.detail>1&&e.preventDefault()},onClick:e=>{e.stopPropagation();const t=e.target;Q(t)&&X(t,s.current)&&(e.preventDefault(),u?(m(!1),p(!0)):m(!0))}}),f,a.createElement(G.z,{lazy:!1,collapsed:u,disableSSRStyle:!0,onCollapseTransitionEnd:e=>{m(e),p(!e)}},a.createElement("div",{className:U.collapsibleContent},n)))}const J={details:"details_b_Ee"},K="alert alert--info";function ee(e){let{...t}=e;return a.createElement(Y,(0,r.Z)({},t,{className:(0,i.Z)(K,J.details,t.className)}))}var te=n(2503);function ne(e){return a.createElement(te.Z,e)}const ae={containsTaskList:"containsTaskList_mC6p"};const oe={img:"img_ev3q"};const re="admonition_LlT9",ce="admonitionHeading_tbUL",le="admonitionIcon_kALy",ie="admonitionContent_S0QG";const se={note:{infimaClassName:"secondary",iconComponent:function(){return a.createElement("svg",{viewBox:"0 0 14 16"},a.createElement("path",{fillRule:"evenodd",d:"M6.3 5.69a.942.942 0 0 1-.28-.7c0-.28.09-.52.28-.7.19-.18.42-.28.7-.28.28 0 .52.09.7.28.18.19.28.42.28.7 0 .28-.09.52-.28.7a1 1 0 0 1-.7.3c-.28 0-.52-.11-.7-.3zM8 7.99c-.02-.25-.11-.48-.31-.69-.2-.19-.42-.3-.69-.31H6c-.27.02-.48.13-.69.31-.2.2-.3.44-.31.69h1v3c.02.27.11.5.31.69.2.2.42.31.69.31h1c.27 0 .48-.11.69-.31.2-.19.3-.42.31-.69H8V7.98v.01zM7 2.3c-3.14 0-5.7 2.54-5.7 5.68 0 3.14 2.56 5.7 5.7 5.7s5.7-2.55 5.7-5.7c0-3.15-2.56-5.69-5.7-5.69v.01zM7 .98c3.86 0 7 3.14 7 7s-3.14 7-7 7-7-3.12-7-7 3.14-7 7-7z"}))},label:a.createElement(M.Z,{id:"theme.admonition.note",description:"The default label used for the Note admonition (:::note)"},"note")},tip:{infimaClassName:"success",iconComponent:function(){return a.createElement("svg",{viewBox:"0 0 12 16"},a.createElement("path",{fillRule:"evenodd",d:"M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"}))},label:a.createElement(M.Z,{id:"theme.admonition.tip",description:"The default label used for the Tip admonition (:::tip)"},"tip")},danger:{infimaClassName:"danger",iconComponent:function(){return a.createElement("svg",{viewBox:"0 0 12 16"},a.createElement("path",{fillRule:"evenodd",d:"M5.05.31c.81 2.17.41 3.38-.52 4.31C3.55 5.67 1.98 6.45.9 7.98c-1.45 2.05-1.7 6.53 3.53 7.7-2.2-1.16-2.67-4.52-.3-6.61-.61 2.03.53 3.33 1.94 2.86 1.39-.47 2.3.53 2.27 1.67-.02.78-.31 1.44-1.13 1.81 3.42-.59 4.78-3.42 4.78-5.56 0-2.84-2.53-3.22-1.25-5.61-1.52.13-2.03 1.13-1.89 2.75.09 1.08-1.02 1.8-1.86 1.33-.67-.41-.66-1.19-.06-1.78C8.18 5.31 8.68 2.45 5.05.32L5.03.3l.02.01z"}))},label:a.createElement(M.Z,{id:"theme.admonition.danger",description:"The default label used for the Danger admonition (:::danger)"},"danger")},info:{infimaClassName:"info",iconComponent:function(){return a.createElement("svg",{viewBox:"0 0 14 16"},a.createElement("path",{fillRule:"evenodd",d:"M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"}))},label:a.createElement(M.Z,{id:"theme.admonition.info",description:"The default label used for the Info admonition (:::info)"},"info")},caution:{infimaClassName:"warning",iconComponent:function(){return a.createElement("svg",{viewBox:"0 0 16 16"},a.createElement("path",{fillRule:"evenodd",d:"M8.893 1.5c-.183-.31-.52-.5-.887-.5s-.703.19-.886.5L.138 13.499a.98.98 0 0 0 0 1.001c.193.31.53.501.886.501h13.964c.367 0 .704-.19.877-.5a1.03 1.03 0 0 0 .01-1.002L8.893 1.5zm.133 11.497H6.987v-2.003h2.039v2.003zm0-3.004H6.987V5.987h2.039v4.006z"}))},label:a.createElement(M.Z,{id:"theme.admonition.caution",description:"The default label used for the Caution admonition (:::caution)"},"caution")}},ue={secondary:"note",important:"info",success:"tip",warning:"danger"};function me(e){const{mdxAdmonitionTitle:t,rest:n}=function(e){const t=a.Children.toArray(e),n=t.find((e=>a.isValidElement(e)&&"mdxAdmonitionTitle"===e.props?.mdxType)),o=a.createElement(a.Fragment,null,t.filter((e=>e!==n)));return{mdxAdmonitionTitle:n,rest:o}}(e.children);return{...e,title:e.title??t,children:n}}const de={head:function(e){const t=a.Children.map(e.children,(e=>a.isValidElement(e)?function(e){if(e.props?.mdxType&&e.props.originalType){const{mdxType:t,originalType:n,...o}=e.props;return a.createElement(e.props.originalType,o)}return e}(e):e));return a.createElement(c.Z,e,t)},code:function(e){const t=["a","abbr","b","br","button","cite","code","del","dfn","em","i","img","input","ins","kbd","label","object","output","q","ruby","s","small","span","strong","sub","sup","time","u","var","wbr"];return a.Children.toArray(e.children).every((e=>"string"==typeof e&&!e.includes("\n")||(0,a.isValidElement)(e)&&t.includes(e.props?.mdxType)))?a.createElement("code",e):a.createElement(F,e)},a:function(e){return a.createElement(q.Z,e)},pre:function(e){return a.createElement(F,(0,a.isValidElement)(e.children)&&"code"===e.children.props?.originalType?e.children.props:{...e})},details:function(e){const t=a.Children.toArray(e.children),n=t.find((e=>a.isValidElement(e)&&"summary"===e.props?.mdxType)),o=a.createElement(a.Fragment,null,t.filter((e=>e!==n)));return a.createElement(ee,(0,r.Z)({},e,{summary:n}),o)},ul:function(e){return a.createElement("ul",(0,r.Z)({},e,{className:(t=e.className,(0,i.Z)(t,t?.includes("contains-task-list")&&ae.containsTaskList))}));var t},img:function(e){return a.createElement("img",(0,r.Z)({loading:"lazy"},e,{className:(t=e.className,(0,i.Z)(t,oe.img))}));var t},h1:e=>a.createElement(ne,(0,r.Z)({as:"h1"},e)),h2:e=>a.createElement(ne,(0,r.Z)({as:"h2"},e)),h3:e=>a.createElement(ne,(0,r.Z)({as:"h3"},e)),h4:e=>a.createElement(ne,(0,r.Z)({as:"h4"},e)),h5:e=>a.createElement(ne,(0,r.Z)({as:"h5"},e)),h6:e=>a.createElement(ne,(0,r.Z)({as:"h6"},e)),admonition:function(e){const{children:t,type:n,title:o,icon:r}=me(e),c=function(e){const t=ue[e]??e,n=se[t];return n||(console.warn(`No admonition config found for admonition type "${t}". Using Info as fallback.`),se.info)}(n),l=o??c.label,{iconComponent:s}=c,u=r??a.createElement(s,null);return a.createElement("div",{className:(0,i.Z)(d.k.common.admonition,d.k.common.admonitionType(e.type),"alert",`alert--${c.infimaClassName}`,re)},a.createElement("div",{className:ce},a.createElement("span",{className:le},u),l),a.createElement("div",{className:ie},t))},mermaid:()=>null};function pe(e){let{children:t}=e;return a.createElement(o.Zo,{components:de},t)}},2244:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var a=n(7294),o=n(6010),r=n(9960);function c(e){const{permalink:t,title:n,subLabel:c,isNext:l}=e;return a.createElement(r.Z,{className:(0,o.Z)("pagination-nav__link",l?"pagination-nav__link--next":"pagination-nav__link--prev"),to:t},c&&a.createElement("div",{className:"pagination-nav__sublabel"},c),a.createElement("div",{className:"pagination-nav__label"},n))}},3008:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var a=n(7294),o=n(6010),r=n(9960);const c={tag:"tag_zVej",tagRegular:"tagRegular_sFm0",tagWithCount:"tagWithCount_h2kH"};function l(e){let{permalink:t,label:n,count:l}=e;return a.createElement(r.Z,{href:t,className:(0,o.Z)(c.tag,l?c.tagWithCount:c.tagRegular)},n,l&&a.createElement("span",null,l))}},1526:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var a=n(7294),o=n(6010),r=n(5999),c=n(3008);const l={tags:"tags_jXut",tag:"tag_QGVx"};function i(e){let{tags:t}=e;return a.createElement(a.Fragment,null,a.createElement("b",null,a.createElement(r.Z,{id:"theme.tags.tagsListLabel",description:"The label alongside a tag list"},"Tags:")),a.createElement("ul",{className:(0,o.Z)(l.tags,"padding--none","margin-left--sm")},t.map((e=>{let{label:t,permalink:n}=e;return a.createElement("li",{key:n,className:l.tag},a.createElement(c.Z,{label:t,permalink:n}))}))))}},7594:(e,t)=>{function n(e){let t,n=[];for(let a of e.split(",").map((e=>e.trim())))if(/^-?\d+$/.test(a))n.push(parseInt(a,10));else if(t=a.match(/^(-?\d+)(-|\.\.\.?|\u2025|\u2026|\u22EF)(-?\d+)$/)){let[e,a,o,r]=t;if(a&&r){a=parseInt(a),r=parseInt(r);const e=a{r.d(t,{Zo:()=>p,kt:()=>y});var n=r(7294);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var l=n.createContext({}),s=function(e){var t=n.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},p=function(e){var t=s(e.components);return n.createElement(l.Provider,{value:t},e.children)},d="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},u=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,a=e.originalType,l=e.parentName,p=c(e,["components","mdxType","originalType","parentName"]),d=s(r),u=o,y=d["".concat(l,".").concat(u)]||d[u]||m[u]||a;return r?n.createElement(y,i(i({ref:t},p),{},{components:r})):n.createElement(y,i({ref:t},p))}));function y(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=r.length,i=new Array(a);i[0]=u;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c[d]="string"==typeof e?e:o,i[1]=c;for(var s=2;s{r.r(t),r.d(t,{assets:()=>l,contentTitle:()=>i,default:()=>m,frontMatter:()=>a,metadata:()=>c,toc:()=>s});var n=r(7462),o=(r(7294),r(3905));const a={id:"dynamiccolorios",title:"DynamicColorIOS",officialDoc:"https://reactnative.dev/docs/dynamiccolorios"},i=void 0,c={unversionedId:"dynamiccolorios",id:"dynamiccolorios",title:"DynamicColorIOS",description:'DynamicColorIOS takes a single argument as an record with two keys: dark and light. These correspond to the colors you want to use for "light mode" and "dark mode" on iOS.',source:"@site/docs/dynamiccolorios.md",sourceDirName:".",slug:"/dynamiccolorios",permalink:"/docs/dynamiccolorios",draft:!1,editUrl:"https://github.com/rescript-react-native/rescript-react-native.github.io/edit/src/docs/dynamiccolorios.md",tags:[],version:"current",frontMatter:{id:"dynamiccolorios",title:"DynamicColorIOS",officialDoc:"https://reactnative.dev/docs/dynamiccolorios"}},l={},s=[{value:"Types",id:"types",level:2},{value:"Methods",id:"methods",level:2},{value:"make
",id:"make",level:3},{value:"Example",id:"example",level:2}],p={toc:s},d="wrapper";function m(e){let{components:t,...r}=e;return(0,o.kt)(d,(0,n.Z)({},p,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,'DynamicColorIOS takes a single argument as an record with two keys: dark and light. These correspond to the colors you want to use for "light mode" and "dark mode" on iOS.'),(0,o.kt)("h2",{id:"types"},"Types"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-rescript"},"type t = {\n dark: Color.t,\n light: Color.t\n}\n")),(0,o.kt)("h2",{id:"methods"},"Methods"),(0,o.kt)("h3",{id:"make"},(0,o.kt)("inlineCode",{parentName:"h3"},"make")),(0,o.kt)("p",null,(0,o.kt)("inlineCode",{parentName:"p"},"make")," takes an record with ",(0,o.kt)("inlineCode",{parentName:"p"},"dark")," and ",(0,o.kt)("inlineCode",{parentName:"p"},"light"),", and returns a color corresponding to the user's dark mode configuration."),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-rescript"},"make: t => Color.t\n")),(0,o.kt)("h2",{id:"example"},"Example"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-rescript"},'open ReactNative\n\nlet labelColor = DynamicColorIOS.make({ light: "black", dark: "white" })\n')))}m.isMDXComponent=!0}}]);
\ No newline at end of file
diff --git a/assets/js/8ed8566e.132ba976.js b/assets/js/8ed8566e.132ba976.js
new file mode 100644
index 0000000..8c329b6
--- /dev/null
+++ b/assets/js/8ed8566e.132ba976.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunkrescript_react_native_github_io=self.webpackChunkrescript_react_native_github_io||[]).push([[4598],{3905:(e,r,t)=>{t.d(r,{Zo:()=>l,kt:()=>d});var n=t(7294);function a(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function o(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function i(e){for(var r=1;r=0||(a[t]=e[t]);return a}(e,r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var u=n.createContext({}),p=function(e){var r=n.useContext(u),t=r;return e&&(t="function"==typeof e?e(r):i(i({},r),e)),t},l=function(e){var r=p(e.components);return n.createElement(u.Provider,{value:r},e.children)},s="mdxType",f={inlineCode:"code",wrapper:function(e){var r=e.children;return n.createElement(n.Fragment,{},r)}},m=n.forwardRef((function(e,r){var t=e.components,a=e.mdxType,o=e.originalType,u=e.parentName,l=c(e,["components","mdxType","originalType","parentName"]),s=p(t),m=a,d=s["".concat(u,".").concat(m)]||s[m]||f[m]||o;return t?n.createElement(d,i(i({ref:r},l),{},{components:t})):n.createElement(d,i({ref:r},l))}));function d(e,r){var t=arguments,a=r&&r.mdxType;if("string"==typeof e||a){var o=t.length,i=new Array(o);i[0]=m;var c={};for(var u in r)hasOwnProperty.call(r,u)&&(c[u]=r[u]);c.originalType=e,c[s]="string"==typeof e?e:a,i[1]=c;for(var p=2;p{t.r(r),t.d(r,{assets:()=>u,contentTitle:()=>i,default:()=>f,frontMatter:()=>o,metadata:()=>c,toc:()=>p});var n=t(7462),a=(t(7294),t(3905));const o={id:"uimanager",title:"UIManager",wip:!0},i=void 0,c={unversionedId:"uimanager",id:"uimanager",title:"UIManager",description:"",source:"@site/docs/uimanager.md",sourceDirName:".",slug:"/uimanager",permalink:"/docs/uimanager",draft:!1,editUrl:"https://github.com/rescript-react-native/rescript-react-native.github.io/edit/src/docs/uimanager.md",tags:[],version:"current",frontMatter:{id:"uimanager",title:"UIManager",wip:!0}},u={},p=[],l={toc:p},s="wrapper";function f(e){let{components:r,...t}=e;return(0,a.kt)(s,(0,n.Z)({},l,t,{components:r,mdxType:"MDXLayout"}))}f.isMDXComponent=!0}}]);
\ No newline at end of file
diff --git a/assets/js/90e0c90f.88809d17.js b/assets/js/90e0c90f.88809d17.js
new file mode 100644
index 0000000..415d020
--- /dev/null
+++ b/assets/js/90e0c90f.88809d17.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunkrescript_react_native_github_io=self.webpackChunkrescript_react_native_github_io||[]).push([[5599],{3905:(e,t,r)=>{r.d(t,{Zo:()=>l,kt:()=>m});var n=r(7294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function c(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var s=n.createContext({}),p=function(e){var t=n.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):c(c({},t),e)),r},l=function(e){var t=p(e.components);return n.createElement(s.Provider,{value:t},e.children)},u="mdxType",f={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},y=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,o=e.originalType,s=e.parentName,l=i(e,["components","mdxType","originalType","parentName"]),u=p(r),y=a,m=u["".concat(s,".").concat(y)]||u[y]||f[y]||o;return r?n.createElement(m,c(c({ref:t},l),{},{components:r})):n.createElement(m,c({ref:t},l))}));function m(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=r.length,c=new Array(o);c[0]=y;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i[u]="string"==typeof e?e:a,c[1]=i;for(var p=2;p{r.r(t),r.d(t,{assets:()=>s,contentTitle:()=>c,default:()=>f,frontMatter:()=>o,metadata:()=>i,toc:()=>p});var n=r(7462),a=(r(7294),r(3905));const o={id:"asyncstorage",title:"AsyncStorage"},c=void 0,i={unversionedId:"asyncstorage",id:"asyncstorage",title:"AsyncStorage",description:"AsyncStorage has been deprecated and will be removed from React Native in the",source:"@site/docs/asyncstorage.md",sourceDirName:".",slug:"/asyncstorage",permalink:"/docs/asyncstorage",draft:!1,editUrl:"https://github.com/rescript-react-native/rescript-react-native.github.io/edit/src/docs/asyncstorage.md",tags:[],version:"current",frontMatter:{id:"asyncstorage",title:"AsyncStorage"}},s={},p=[],l={toc:p},u="wrapper";function f(e){let{components:t,...r}=e;return(0,a.kt)(u,(0,n.Z)({},l,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,(0,a.kt)("inlineCode",{parentName:"p"},"AsyncStorage")," has been deprecated and will be removed from React Native in the\nfuture."),(0,a.kt)("p",null,"Please refer to ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/rescript-react-native/async-storage"},"bindings"),"\nfor the replacement\n",(0,a.kt)("a",{parentName:"p",href:"https://github.com/react-native-community/async-storage"},"community package"),"."))}f.isMDXComponent=!0}}]);
\ No newline at end of file
diff --git a/assets/js/935f2afb.074329d7.js b/assets/js/935f2afb.074329d7.js
new file mode 100644
index 0000000..4feed40
--- /dev/null
+++ b/assets/js/935f2afb.074329d7.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunkrescript_react_native_github_io=self.webpackChunkrescript_react_native_github_io||[]).push([[53],{1109:e=>{e.exports=JSON.parse('{"pluginId":"default","version":"current","label":"Next","banner":null,"badge":false,"noIndex":false,"className":"docs-version-current","isLast":true,"docsSidebars":{"docs":[{"type":"category","label":"Docs","items":[{"type":"link","label":"Getting Started","href":"/docs/","docId":"index"},{"type":"link","label":"Installation","href":"/docs/install","docId":"install"},{"type":"link","label":"Usage","href":"/docs/usage","docId":"usage"},{"type":"link","label":"Example","href":"/docs/example","docId":"example"},{"type":"link","label":"Cheatsheet","href":"/docs/cheatsheet","docId":"cheatsheet"}],"collapsed":true,"collapsible":true}],"api":[{"type":"category","label":"APIs","items":[{"type":"link","label":"APIs","href":"/docs/apis","docId":"apis"},{"type":"link","label":"AccessibilityInfo","href":"/docs/accessibilityinfo","docId":"accessibilityinfo"},{"type":"link","label":"ActionSheetIOS","href":"/docs/actionsheetios","docId":"actionsheetios"},{"type":"link","label":"Alert","href":"/docs/alert","docId":"alert"},{"type":"link","label":"Animated","href":"/docs/animated","docId":"animated"},{"type":"link","label":"AnimationFrame","href":"/docs/animationframe","docId":"animationframe"},{"type":"link","label":"AppRegistry","href":"/docs/appregistry","docId":"appregistry"},{"type":"link","label":"AppState","href":"/docs/appstate","docId":"appstate"},{"type":"link","label":"BackHandler","href":"/docs/backhandler","docId":"backhandler"},{"type":"link","label":"Dimensions","href":"/docs/dimensions","docId":"dimensions"},{"type":"link","label":"Easing","href":"/docs/easing","docId":"easing"},{"type":"link","label":"Event","href":"/docs/event","docId":"event"},{"type":"link","label":"Global","href":"/docs/global","docId":"global"},{"type":"link","label":"InteractionManager","href":"/docs/interactionmanager","docId":"interactionmanager"},{"type":"link","label":"Keyboard","href":"/docs/keyboard","docId":"keyboard"},{"type":"link","label":"LayoutAnimation","href":"/docs/layoutanimation","docId":"layoutanimation"},{"type":"link","label":"Linking","href":"/docs/linking","docId":"linking"},{"type":"link","label":"Packager","href":"/docs/packager","docId":"packager"},{"type":"link","label":"PanResponder","href":"/docs/panresponder","docId":"panresponder"},{"type":"link","label":"PermissionsAndroid","href":"/docs/permissionsandroid","docId":"permissionsandroid"},{"type":"link","label":"PixelRatio","href":"/docs/pixelratio","docId":"pixelratio"},{"type":"link","label":"Platform","href":"/docs/platform","docId":"platform"},{"type":"link","label":"PlatformColor","href":"/docs/platformcolor","docId":"platformcolor"},{"type":"link","label":"Settings","href":"/docs/settings","docId":"settings"},{"type":"link","label":"Share","href":"/docs/share","docId":"share"},{"type":"link","label":"Style","href":"/docs/style","docId":"style"},{"type":"link","label":"StyleSheet","href":"/docs/stylesheet","docId":"stylesheet"},{"type":"link","label":"ToastAndroid","href":"/docs/toastandroid","docId":"toastandroid"},{"type":"link","label":"Vibration","href":"/docs/vibration","docId":"vibration"}],"collapsed":true,"collapsible":true}],"components":[{"type":"category","label":"Components","items":[{"type":"link","label":"Components","href":"/docs/components","docId":"components"},{"type":"link","label":"ActivityIndicator","href":"/docs/activityindicator","docId":"activityindicator"},{"type":"link","label":"Button","href":"/docs/button","docId":"button"},{"type":"link","label":"DrawerLayoutAndroid","href":"/docs/drawerlayoutandroid","docId":"drawerlayoutandroid"},{"type":"link","label":"FlatList","href":"/docs/flatlist","docId":"flatlist"},{"type":"link","label":"Image","href":"/docs/image","docId":"image"},{"type":"link","label":"ImageBackground","href":"/docs/imagebackground","docId":"imagebackground"},{"type":"link","label":"InputAccessoryView","href":"/docs/inputaccessoryview","docId":"inputaccessoryview"},{"type":"link","label":"KeyboardAvoidingView","href":"/docs/keyboardavoidingview","docId":"keyboardavoidingview"},{"type":"link","label":"MaskedViewIOS","href":"/docs/maskedviewios","docId":"maskedviewios"},{"type":"link","label":"Modal","href":"/docs/modal","docId":"modal"},{"type":"link","label":"Pressable","href":"/docs/pressable","docId":"pressable"},{"type":"link","label":"RefreshControl","href":"/docs/refreshcontrol","docId":"refreshcontrol"},{"type":"link","label":"SafeAreaView","href":"/docs/safeareaview","docId":"safeareaview"},{"type":"link","label":"ScrollView","href":"/docs/scrollview","docId":"scrollview"},{"type":"link","label":"SectionList","href":"/docs/sectionlist","docId":"sectionlist"},{"type":"link","label":"StatusBar","href":"/docs/statusbar","docId":"statusbar"},{"type":"link","label":"Switch","href":"/docs/switch","docId":"switch"},{"type":"link","label":"Text","href":"/docs/text","docId":"text"},{"type":"link","label":"TextInput","href":"/docs/textinput","docId":"textinput"},{"type":"link","label":"TouchableHighlight","href":"/docs/touchablehighlight","docId":"touchablehighlight"},{"type":"link","label":"TouchableNativeFeedback","href":"/docs/touchablenativefeedback","docId":"touchablenativefeedback"},{"type":"link","label":"TouchableOpacity","href":"/docs/touchableopacity","docId":"touchableopacity"},{"type":"link","label":"TouchableWithoutFeedback","href":"/docs/touchablewithoutfeedback","docId":"touchablewithoutfeedback"},{"type":"link","label":"View","href":"/docs/view","docId":"view"},{"type":"link","label":"VirtualizedList","href":"/docs/virtualizedlist","docId":"virtualizedlist"}],"collapsed":true,"collapsible":true}]},"docs":{"accessibilityinfo":{"id":"accessibilityinfo","title":"AccessibilityInfo","description":"Types","sidebar":"api"},"actionsheetios":{"id":"actionsheetios","title":"ActionSheetIOS","description":"","sidebar":"api"},"activityindicator":{"id":"activityindicator","title":"ActivityIndicator","description":"","sidebar":"components"},"alert":{"id":"alert","title":"Alert","description":"Methods","sidebar":"api"},"animated":{"id":"animated","title":"Animated","description":"","sidebar":"api"},"animationframe":{"id":"animationframe","title":"AnimationFrame","description":"request","sidebar":"api"},"apis":{"id":"apis","title":"APIs","description":"React Native provides a number of built-in APIs ready for you to use in your app. You can find them all in the left sidebar (or menu above, if you are on a narrow screen).","sidebar":"api"},"appearance":{"id":"appearance","title":"Appearance","description":"Appearance exposes information about the preferred color scheme (light or"},"appregistry":{"id":"appregistry","title":"AppRegistry","description":"","sidebar":"api"},"appstate":{"id":"appstate","title":"AppState","description":"","sidebar":"api"},"asyncstorage":{"id":"asyncstorage","title":"AsyncStorage","description":"AsyncStorage has been deprecated and will be removed from React Native in the"},"backhandler":{"id":"backhandler","title":"BackHandler","description":"","sidebar":"api"},"button":{"id":"button","title":"Button","description":"Example","sidebar":"components"},"cheatsheet":{"id":"cheatsheet","title":"Cheatsheet","description":"If you are not familiar with ReScript / Reason, be sure to check ReScript Overview to learn how to interop with JavaScript","sidebar":"docs"},"clipboard":{"id":"clipboard","title":"Clipboard","description":"Clipboard has been deprecated and will be removed from React Native in the"},"components":{"id":"components","title":"Components","description":"React Native provides a number of built-in Core Componentsready for you to use in your app. You can find them all in the left sidebar (or menu above, if you are on a narrow screen). If you\'re not sure where to get started, take a look at the following categories:","sidebar":"components"},"datepickerandroid":{"id":"datepickerandroid","title":"DatePickerAndroid","description":"DatePickerAndroid has been deprecated and will be removed from React Native in"},"datepickerios":{"id":"datepickerios","title":"DatePickerIOS","description":"DatePickerIOS has been deprecated and will be removed from React Native in the"},"devsettings":{"id":"devsettings","title":"DevSettings","description":"DevSettings provides methods for developers."},"dimensions":{"id":"dimensions","title":"Dimensions","description":"","sidebar":"api"},"drawerlayoutandroid":{"id":"drawerlayoutandroid","title":"DrawerLayoutAndroid","description":"","sidebar":"components"},"dynamiccolorios":{"id":"dynamiccolorios","title":"DynamicColorIOS","description":"DynamicColorIOS takes a single argument as an record with two keys: dark and light. These correspond to the colors you want to use for \\"light mode\\" and \\"dark mode\\" on iOS."},"easing":{"id":"easing","title":"Easing","description":"","sidebar":"api"},"event":{"id":"event","title":"Event","description":"These are the types of objects returned in Event callbacks. Types are","sidebar":"api"},"eventsubscription":{"id":"eventsubscription","title":"EventSubscription","description":""},"example":{"id":"example","title":"Example","description":"As soon as you","sidebar":"docs"},"flatlist":{"id":"flatlist","title":"FlatList","description":"","sidebar":"components"},"geolocation":{"id":"geolocation","title":"GeoLocation","description":"GeoLocation has been removed from React Native."},"global":{"id":"global","title":"Global","description":"This module contains various APIs & flags that are in JavaScript global scope.","sidebar":"api"},"image":{"id":"image","title":"Image","description":"","sidebar":"components"},"imagebackground":{"id":"imagebackground","title":"ImageBackground","description":"","sidebar":"components"},"imageeditor":{"id":"imageeditor","title":"ImageEditor","description":"ImageEditor has been removed from React Native."},"imagepickerios":{"id":"imagepickerios","title":"ImagePickerIOS","description":"Note"},"index":{"id":"index","title":"Getting Started","description":"ReScript React Native is a safe & simple way to build","sidebar":"docs"},"inputaccessoryview":{"id":"inputaccessoryview","title":"InputAccessoryView","description":"","sidebar":"components"},"install":{"id":"install","title":"Installation","description":"Depending on how you want to start with ReScript React Native, you have","sidebar":"docs"},"interactionmanager":{"id":"interactionmanager","title":"InteractionManager","description":"","sidebar":"api"},"keyboard":{"id":"keyboard","title":"Keyboard","description":"","sidebar":"api"},"keyboardavoidingview":{"id":"keyboardavoidingview","title":"KeyboardAvoidingView","description":"","sidebar":"components"},"layoutanimation":{"id":"layoutanimation","title":"LayoutAnimation","description":"LayoutAnimation API offers a simpler alternative to Animated API. Instead of","sidebar":"api"},"linking":{"id":"linking","title":"Linking","description":"Only for projects supporting Native Code. Requires the project to have been","sidebar":"api"},"logbox":{"id":"logbox","title":"LogBox","description":"Errors and warnings in development builds are displayed in LogBox inside your app."},"maskedviewios":{"id":"maskedviewios","title":"MaskedViewIOS","description":"MaskedViewIOS has been deprecated and will be removed from React Native in the","sidebar":"components"},"modal":{"id":"modal","title":"Modal","description":"","sidebar":"components"},"nativeeventemitter":{"id":"nativeeventemitter","title":"NativeEventEmitter","description":""},"nativemodules":{"id":"nativemodules","title":"NativeModules","description":""},"netinfo":{"id":"netinfo","title":"NetInfo","description":"NetInfo has been removed from React Native."},"packager":{"id":"packager","title":"Packager","description":"Packager.require","sidebar":"api"},"panresponder":{"id":"panresponder","title":"PanResponder","description":"PanResponder allows more fine-grained control of the","sidebar":"api"},"permissionsandroid":{"id":"permissionsandroid","title":"PermissionsAndroid","description":"Only for projects supporting Native Code. Requires the project to have been","sidebar":"api"},"picker":{"id":"picker","title":"Picker","description":"Picker has been deprecated and will be removed from React Native in the"},"pixelratio":{"id":"pixelratio","title":"PixelRatio","description":"","sidebar":"api"},"platform":{"id":"platform","title":"Platform","description":"Platform.os","sidebar":"api"},"platformcolor":{"id":"platformcolor","title":"PlatformColor","description":"Functions to access native colors on the target platform by supplying the native color\u2019s corresponding value.","sidebar":"api"},"pressable":{"id":"pressable","title":"Pressable","description":"Pressable is a Core Component wrapper that can detect various stages of press interactions on any of it\'s defined children.","sidebar":"components"},"progressbarandroid":{"id":"progressbarandroid","title":"ProgressBarAndroid","description":"ProgressBarAndroid has been deprecated and will be removed from React Native"},"progressviewios":{"id":"progressviewios","title":"ProgressViewIOS","description":"ProgressViewIOS has been deprecated and will be removed from React Native in"},"pushnotificationios":{"id":"pushnotificationios","title":"PushNotificationIOS","description":"PushNotificationIOS has been deprecated and will be removed from React Native"},"refreshcontrol":{"id":"refreshcontrol","title":"RefreshControl","description":"","sidebar":"components"},"safeareaview":{"id":"safeareaview","title":"SafeAreaView","description":"","sidebar":"components"},"scrollview":{"id":"scrollview","title":"ScrollView","description":"Methods","sidebar":"components"},"sectionlist":{"id":"sectionlist","title":"SectionList","description":"","sidebar":"components"},"segmentedcontrolios":{"id":"segmentedcontrolios","title":"SegmentedControlIOS","description":"SegmentedControlIOS has been deprecated and will be removed from React Native"},"settings":{"id":"settings","title":"Settings","description":"","sidebar":"api"},"share":{"id":"share","title":"Share","description":"","sidebar":"api"},"slider":{"id":"slider","title":"Slider","description":"Slider has been deprecated and will be removed from React Native in the"},"snapshotviewios":{"id":"snapshotviewios","title":"SnapshotViewIOS","description":""},"soundmanager":{"id":"soundmanager","title":"SoundManager","description":""},"statusbar":{"id":"statusbar","title":"StatusBar","description":"","sidebar":"components"},"style":{"id":"style","title":"Style","description":"Styles accepted by most components (thanks to a style prop) are defined using","sidebar":"api"},"stylesheet":{"id":"stylesheet","title":"StyleSheet","description":"StyleSheet mainly has a method to create an object containing many","sidebar":"api"},"switch":{"id":"switch","title":"Switch","description":"","sidebar":"components"},"text":{"id":"text","title":"Text","description":"Example","sidebar":"components"},"textinput":{"id":"textinput","title":"TextInput","description":"","sidebar":"components"},"timepickerandroid":{"id":"timepickerandroid","title":"TimePickerAndroid","description":"TimePickerAndroid has been removed from React Native."},"toastandroid":{"id":"toastandroid","title":"ToastAndroid","description":"","sidebar":"api"},"toolbarandroid":{"id":"toolbarandroid","title":"ToolbarAndroid","description":"ToolbarAndroid has been removed from React Native."},"touchablehighlight":{"id":"touchablehighlight","title":"TouchableHighlight","description":"","sidebar":"components"},"touchablenativefeedback":{"id":"touchablenativefeedback","title":"TouchableNativeFeedback","description":"","sidebar":"components"},"touchableopacity":{"id":"touchableopacity","title":"TouchableOpacity","description":"","sidebar":"components"},"touchablewithoutfeedback":{"id":"touchablewithoutfeedback","title":"TouchableWithoutFeedback","description":"","sidebar":"components"},"uimanager":{"id":"uimanager","title":"UIManager","description":""},"usage":{"id":"usage","title":"Usage","description":"When rescript, @rescript/react and rescript-react-native are installed, you","sidebar":"docs"},"vibration":{"id":"vibration","title":"Vibration","description":"","sidebar":"api"},"view":{"id":"view","title":"View","description":"","sidebar":"components"},"viewpagerandroid":{"id":"viewpagerandroid","title":"ViewPagerAndroid","description":"ViewPagerAndroid has been removed from React Native."},"virtualizedlist":{"id":"virtualizedlist","title":"VirtualizedList","description":"","sidebar":"components"},"virtualizedsectionlist":{"id":"virtualizedsectionlist","title":"VirtualizedSectionList","description":""},"webview":{"id":"webview","title":"WebView","description":"WebView has been removed from React Native."},"yellowbox":{"id":"yellowbox","title":"YellowBox","description":"Warning messages are displayed in white on a yellow background; which is known"}}}')}}]);
\ No newline at end of file
diff --git a/assets/js/945545dd.9d049370.js b/assets/js/945545dd.9d049370.js
new file mode 100644
index 0000000..405312e
--- /dev/null
+++ b/assets/js/945545dd.9d049370.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunkrescript_react_native_github_io=self.webpackChunkrescript_react_native_github_io||[]).push([[5220],{3905:(e,t,r)=>{r.d(t,{Zo:()=>u,kt:()=>d});var n=r(7294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var p=n.createContext({}),l=function(e){var t=n.useContext(p),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},u=function(e){var t=l(e.components);return n.createElement(p.Provider,{value:t},e.children)},s="mdxType",f={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,o=e.originalType,p=e.parentName,u=c(e,["components","mdxType","originalType","parentName"]),s=l(r),m=a,d=s["".concat(p,".").concat(m)]||s[m]||f[m]||o;return r?n.createElement(d,i(i({ref:t},u),{},{components:r})):n.createElement(d,i({ref:t},u))}));function d(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=r.length,i=new Array(o);i[0]=m;var c={};for(var p in t)hasOwnProperty.call(t,p)&&(c[p]=t[p]);c.originalType=e,c[s]="string"==typeof e?e:a,i[1]=c;for(var l=2;l{r.r(t),r.d(t,{assets:()=>p,contentTitle:()=>i,default:()=>f,frontMatter:()=>o,metadata:()=>c,toc:()=>l});var n=r(7462),a=(r(7294),r(3905));const o={id:"interactionmanager",title:"InteractionManager",wip:!0},i=void 0,c={unversionedId:"interactionmanager",id:"interactionmanager",title:"InteractionManager",description:"",source:"@site/docs/interactionmanager.md",sourceDirName:".",slug:"/interactionmanager",permalink:"/docs/interactionmanager",draft:!1,editUrl:"https://github.com/rescript-react-native/rescript-react-native.github.io/edit/src/docs/interactionmanager.md",tags:[],version:"current",frontMatter:{id:"interactionmanager",title:"InteractionManager",wip:!0},sidebar:"api",previous:{title:"Global",permalink:"/docs/global"},next:{title:"Keyboard",permalink:"/docs/keyboard"}},p={},l=[],u={toc:l},s="wrapper";function f(e){let{components:t,...r}=e;return(0,a.kt)(s,(0,n.Z)({},u,r,{components:t,mdxType:"MDXLayout"}))}f.isMDXComponent=!0}}]);
\ No newline at end of file
diff --git a/assets/js/95521f4f.2fb49c04.js b/assets/js/95521f4f.2fb49c04.js
new file mode 100644
index 0000000..1af948a
--- /dev/null
+++ b/assets/js/95521f4f.2fb49c04.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunkrescript_react_native_github_io=self.webpackChunkrescript_react_native_github_io||[]).push([[5085],{3905:(e,t,a)=>{a.d(t,{Zo:()=>p,kt:()=>d});var r=a(7294);function n(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function i(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function o(e){for(var t=1;t=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}var c=r.createContext({}),l=function(e){var t=r.useContext(c),a=t;return e&&(a="function"==typeof e?e(t):o(o({},t),e)),a},p=function(e){var t=l(e.components);return r.createElement(c.Provider,{value:t},e.children)},u="mdxType",h={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var a=e.components,n=e.mdxType,i=e.originalType,c=e.parentName,p=s(e,["components","mdxType","originalType","parentName"]),u=l(a),m=n,d=u["".concat(c,".").concat(m)]||u[m]||h[m]||i;return a?r.createElement(d,o(o({ref:t},p),{},{components:a})):r.createElement(d,o({ref:t},p))}));function d(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var i=a.length,o=new Array(i);o[0]=m;var s={};for(var c in t)hasOwnProperty.call(t,c)&&(s[c]=t[c]);s.originalType=e,s[u]="string"==typeof e?e:n,o[1]=s;for(var l=2;l{a.r(t),a.d(t,{assets:()=>c,contentTitle:()=>o,default:()=>h,frontMatter:()=>i,metadata:()=>s,toc:()=>l});var r=a(7462),n=(a(7294),a(3905));const i={slug:"2021-05-04-hello-rescript-react-native",title:"Hello ReScript React Native",author:"MoOx",author_title:"ReScript React Native Core Team",author_url:"https://github.com/MoOx",author_image_url:"https://avatars.githubusercontent.com/u/157534?v=4",tags:["hello","rescript"]},o=void 0,s={permalink:"/blog/2021-05-04-hello-rescript-react-native",editUrl:"https://github.com/rescript-react-native/rescript-react-native.github.io/edit/src/blog/2021-05-04-hello-rescript-react-native.md",source:"@site/blog/2021-05-04-hello-rescript-react-native.md",title:"Hello ReScript React Native",description:"Following BuckleScript & Reason Rebranding to offer a unified experience, what was know as Reason React Native is now ReScript React Native.",date:"2021-05-04T00:00:00.000Z",formattedDate:"May 4, 2021",tags:[{label:"hello",permalink:"/blog/tags/hello"},{label:"rescript",permalink:"/blog/tags/rescript"}],readingTime:4.25,hasTruncateMarker:!1,authors:[{name:"MoOx",title:"ReScript React Native Core Team",url:"https://github.com/MoOx",imageURL:"https://avatars.githubusercontent.com/u/157534?v=4"}],frontMatter:{slug:"2021-05-04-hello-rescript-react-native",title:"Hello ReScript React Native",author:"MoOx",author_title:"ReScript React Native Core Team",author_url:"https://github.com/MoOx",author_image_url:"https://avatars.githubusercontent.com/u/157534?v=4",tags:["hello","rescript"]},nextItem:{title:"Hello Reason React Native",permalink:"/blog/2019-06-17-hello-reason-react-native"}},c={authorsImageUrls:[void 0]},l=[{value:"Should I migrate now all my packages?",id:"should-i-migrate-now-all-my-packages",level:2},{value:"You use React Native 0.63",id:"you-use-react-native-063",level:3},{value:"You use React Native 0.64",id:"you-use-react-native-064",level:3},{value:"Keep using reason-react-native
",id:"keep-using-reason-react-native",level:4},{value:"Switch to rescript-react-native
",id:"switch-to-rescript-react-native",level:4},{value:"Please note that @rescript/react
is required for switching",id:"please-note-that-rescriptreact-is-required-for-switching",level:4},{value:"tl;dr",id:"tldr",level:2},{value:"Wait.. That's it?",id:"wait-thats-it",level:2},{value:"What's next",id:"whats-next",level:2}],p={toc:l},u="wrapper";function h(e){let{components:t,...a}=e;return(0,n.kt)(u,(0,r.Z)({},p,a,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("p",null,"Following ",(0,n.kt)("a",{parentName:"p",href:"https://rescript-lang.org/blog/bucklescript-is-rebranding"},"BuckleScript & Reason Rebranding")," to offer a unified experience, what was know as ",(0,n.kt)("em",{parentName:"p"},"Reason React Native")," is now ",(0,n.kt)("a",{parentName:"p",href:"https://rescript-react-native.github.io"},"ReScript React Native"),"."),(0,n.kt)("p",null,"To make this short: all packages that were published on the behalf of Reason React Native organisation are now published as the ",(0,n.kt)("em",{parentName:"p"},"ReScript React Native")," organisation."),(0,n.kt)("p",null,"This means:"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"https://www.npmjs.com/package/reason-react-native"},(0,n.kt)("inlineCode",{parentName:"a"},"reason-react-native"))," is now ",(0,n.kt)("a",{parentName:"li",href:"https://www.npmjs.com/package/rescript-react-native"},(0,n.kt)("inlineCode",{parentName:"a"},"rescript-react-native"))),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"https://www.npmjs.com/package/reason-react-navigation"},(0,n.kt)("inlineCode",{parentName:"a"},"reason-react-navigation"))," is now ",(0,n.kt)("a",{parentName:"li",href:"https://www.npmjs.com/package/rescript-react-navigation"},(0,n.kt)("inlineCode",{parentName:"a"},"rescript-react-navigation"))),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"https://www.npmjs.com/settings/reason-react-native/packages"},(0,n.kt)("inlineCode",{parentName:"a"},"@reason-react-native/*"))," are now ",(0,n.kt)("a",{parentName:"li",href:"https://www.npmjs.com/settings/rescript-react-native/packages"},(0,n.kt)("inlineCode",{parentName:"a"},"@rescript-react-native/*")))),(0,n.kt)("h2",{id:"should-i-migrate-now-all-my-packages"},"Should I migrate now all my packages?"),(0,n.kt)("p",null,"It depends on what version of React Native your are using. There is no rush, really."),(0,n.kt)("h3",{id:"you-use-react-native-063"},"You use React Native 0.63"),(0,n.kt)("p",null,"You can keep using ",(0,n.kt)("inlineCode",{parentName:"p"},"reason-react-native")," and friends for now. Revisit this post when you will need to upgrade to 0.64."),(0,n.kt)("h3",{id:"you-use-react-native-064"},"You use React Native 0.64"),(0,n.kt)("p",null,"Here you have 2 possibles upgrades path:"),(0,n.kt)("h4",{id:"keep-using-reason-react-native"},"Keep using ",(0,n.kt)("inlineCode",{parentName:"h4"},"reason-react-native")),(0,n.kt)("p",null,"Before renaming all packages, we offered a ",(0,n.kt)("a",{parentName:"p",href:"https://github.com/rescript-react-native/rescript-react-native/releases/tag/0.64.0"},"last release for ",(0,n.kt)("inlineCode",{parentName:"a"},"reason-react-native"))," to cover React Native 0.64. You can use that until you are ready to switch to ReScript named packages. If you want to know what this will involve, keep reading."),(0,n.kt)("h4",{id:"switch-to-rescript-react-native"},"Switch to ",(0,n.kt)("inlineCode",{parentName:"h4"},"rescript-react-native")),(0,n.kt)("p",null,"The package ",(0,n.kt)("a",{parentName:"p",href:"https://github.com/rescript-react-native/rescript-react-native/releases/tag/0.64.1"},(0,n.kt)("inlineCode",{parentName:"a"},"rescript-react-native")," starts with version 0.64.1"),". You can try to use it for earlier version of React Native of course, but you might end up to minor inconsistencies, especially for bindings that have been tuned for 0.64. Check out ",(0,n.kt)("a",{parentName:"p",href:"https://github.com/rescript-react-native/rescript-react-native/releases/tag/0.64.0"},"breaking changes in release notes")," to know what this is all about."),(0,n.kt)("p",null,"If you are ready to move to ReScript naming, you can use all the new packages. Except ",(0,n.kt)("inlineCode",{parentName:"p"},"rescript-react-native"),", other packages of this organisation have just been renamed for most of them, without any changes."),(0,n.kt)("p",null,"You can expects minor change between ",(0,n.kt)("inlineCode",{parentName:"p"},"reason-react-native@0.64")," & ",(0,n.kt)("inlineCode",{parentName:"p"},"rescript-react-native@0.64")," but this should not cause you any major trouble to switch.\nYou will probably notice some Js.t have been converted to record syntax, some polymorphic variants changes and minor things like that, but compiler should just tell you what to do."),(0,n.kt)("h4",{id:"please-note-that-rescriptreact-is-required-for-switching"},"Please note that ",(0,n.kt)("inlineCode",{parentName:"h4"},"@rescript/react")," is required for switching"),(0,n.kt)("p",null,"You cannot use ",(0,n.kt)("inlineCode",{parentName:"p"},"reason-react")," and ",(0,n.kt)("inlineCode",{parentName:"p"},"@rescript/react"),' as they exposes the same module.\nThis means this will be "all or nothing".\nSome bindings rely on ',(0,n.kt)("inlineCode",{parentName:"p"},"React")," module, so they now depend on ",(0,n.kt)("inlineCode",{parentName:"p"},"@rescript/react"),". This is true for ",(0,n.kt)("inlineCode",{parentName:"p"},"rescript-react-native")," and some other modules."),(0,n.kt)("p",null,"This is briefly mentionned in ",(0,n.kt)("a",{parentName:"p",href:"https://github.com/rescript-react-native/rescript-react-native/releases/tag/0.64.1"},(0,n.kt)("inlineCode",{parentName:"a"},"rescript-react-native@0.64.1")," release notes")," but you will also need ",(0,n.kt)("inlineCode",{parentName:"p"},"bs-platform@^9.0.0"),"."),(0,n.kt)("p",null,"Before you ask, ",(0,n.kt)("inlineCode",{parentName:"p"},"rescript")," package is now a thing and up for testing (you can track this using the ",(0,n.kt)("a",{parentName:"p",href:"https://forum.rescript-lang.org/c/announcements/7"},"ReScript forum, Announcements section"),"). This is considered beta at the time of writing this post, so we will change this peer dependency in a near future, when it's officially stable. This will replace ",(0,n.kt)("inlineCode",{parentName:"p"},"bs-platform"),', probably in next "major" release (0.65 or maybe a 0.64.x-rescript).'),(0,n.kt)("h2",{id:"tldr"},"tl;dr"),(0,n.kt)("p",null,"If you want to switch to the new naming, you need to be ready to use"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},"React 17 and ",(0,n.kt)("inlineCode",{parentName:"li"},"@rescript/react@^0.10")),(0,n.kt)("li",{parentName:"ul"},"React Native 0.64 with ",(0,n.kt)("inlineCode",{parentName:"li"},"rescript-react-native@^0.64.1")),(0,n.kt)("li",{parentName:"ul"},"ReScript 9 via ",(0,n.kt)("inlineCode",{parentName:"li"},"bs-platform@^9.0.0"))),(0,n.kt)("p",null,"If you have any questions regarding these changes and how to proceed, feel free to ",(0,n.kt)("a",{parentName:"p",href:"https://github.com/rescript-react-native/rescript-react-native/discussions/new"},"open a discussion on GitHub"),", or use ",(0,n.kt)("a",{parentName:"p",href:"https://forum.rescript-lang.org"},"ReScript forum"),"."),(0,n.kt)("h2",{id:"wait-thats-it"},"Wait.. That's it?"),(0,n.kt)("p",null,'You might have a question that is still pending: "where is gone the promise of cross-platform code that ReasonML was supposed to offer? I was thinking I could someday use my Reason React Native code to compile it to a lower level language that JavaScript to have blazing fast performance... "'),(0,n.kt)("p",null,"Like I did in the past in my sweet dreams, you may be looking for this. And maybe this will be a reality one day in the future. Some people want this ",(0,n.kt)("em",{parentName:"p"},"JSX like")," convenience to build native apps. Some will argue that there are things that you can use today.\nBut React Native ecosytem is more mature than existing solutions."),(0,n.kt)("p",null,"React Native can safely be used in production today, and it is for ",(0,n.kt)("a",{parentName:"p",href:"https://reactnative.dev/showcase"},"many successful companies"),". All the modules availables (from the core or the community) make it very easy to avoid writing specific code per platform.\nPerformance is better and better for every release. Recently ",(0,n.kt)("a",{parentName:"p",href:"https://reactnative.dev/blog/2021/03/12/version-0.64"},"Hermes JavaScript engine was released for iOS")," and it's ",(0,n.kt)("a",{parentName:"p",href:"https://callstack.com/blog/hermes-performance-on-ios/"},"really fast"),". And don't forget ",(0,n.kt)("a",{parentName:"p",href:"https://github.com/react-native-community/discussions-and-proposals/issues/40"},"TurboModules"),"!"),(0,n.kt)("p",null,"You can not only write mobile apps this days, but also web apps, thanks to ",(0,n.kt)("a",{parentName:"p",href:"https://necolas.github.io/react-native-web/"},"React Native for Web"),", and even native desktop apps, thanks to ",(0,n.kt)("a",{parentName:"p",href:"https://microsoft.github.io/react-native-windows/"},"React Native Windows + macOS"),". More than enough to ship amazing products to production, today."),(0,n.kt)("h2",{id:"whats-next"},"What's next"),(0,n.kt)("p",null,"I guess for the near future, nothing crazy will happen for ReScript React Native. We have to update some bindings from time to time, but beside having to switch from ",(0,n.kt)("inlineCode",{parentName:"p"},"bs-platform")," to ",(0,n.kt)("inlineCode",{parentName:"p"},"rescript"),", things should go smoothly.\nFeel free to ",(0,n.kt)("a",{parentName:"p",href:"https://github.com/rescript-react-native/rescript-react-native/discussions/new"},"open a discussion")," if you want bindings for some modules (or just help to write them)."),(0,n.kt)("p",null,"When stars are not correctly aligned and some package have incorrect bindings, remember that you can always use the fantastic ",(0,n.kt)("a",{parentName:"p",href:"https://www.npmjs.com/package/patch-package"},"patch-package")," to fix things real quick, and then open an issue at the right place."),(0,n.kt)("p",null,"\u2764\ufe0f ",(0,n.kt)("em",{parentName:"p"},"I mostly maintain all this packages all by myself this days, so feel free to ",(0,n.kt)("a",{parentName:"em",href:"https://github.com/sponsors/MoOx"},"Sponsor Me on GitHub")," and just ",(0,n.kt)("a",{parentName:"em",href:"https://twitter.com/MoOx"},"share kind words on Twitter")," to keep me motivated"),". I hope you enjoy this work like I do."))}h.isMDXComponent=!0}}]);
\ No newline at end of file
diff --git a/assets/js/989fc69f.c5a97cd0.js b/assets/js/989fc69f.c5a97cd0.js
new file mode 100644
index 0000000..4bed52d
--- /dev/null
+++ b/assets/js/989fc69f.c5a97cd0.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunkrescript_react_native_github_io=self.webpackChunkrescript_react_native_github_io||[]).push([[375],{3905:(e,t,a)=>{a.d(t,{Zo:()=>p,kt:()=>m});var n=a(7294);function o(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function r(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function i(e){for(var t=1;t=0||(o[a]=e[a]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(o[a]=e[a])}return o}var l=n.createContext({}),c=function(e){var t=n.useContext(l),a=t;return e&&(a="function"==typeof e?e(t):i(i({},t),e)),a},p=function(e){var t=c(e.components);return n.createElement(l.Provider,{value:t},e.children)},h="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},u=n.forwardRef((function(e,t){var a=e.components,o=e.mdxType,r=e.originalType,l=e.parentName,p=s(e,["components","mdxType","originalType","parentName"]),h=c(a),u=o,m=h["".concat(l,".").concat(u)]||h[u]||d[u]||r;return a?n.createElement(m,i(i({ref:t},p),{},{components:a})):n.createElement(m,i({ref:t},p))}));function m(e,t){var a=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var r=a.length,i=new Array(r);i[0]=u;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[h]="string"==typeof e?e:o,i[1]=s;for(var c=2;c{a.r(t),a.d(t,{assets:()=>l,contentTitle:()=>i,default:()=>d,frontMatter:()=>r,metadata:()=>s,toc:()=>c});var n=a(7462),o=(a(7294),a(3905));const r={slug:"2019-06-17-hello-reason-react-native",title:"Hello Reason React Native",author:"MoOx",author_title:"ReScript React Native Core Team",author_url:"https://github.com/MoOx",author_image_url:"https://avatars.githubusercontent.com/u/157534?v=4",tags:["hello","reason"]},i=void 0,s={permalink:"/blog/2019-06-17-hello-reason-react-native",editUrl:"https://github.com/rescript-react-native/rescript-react-native.github.io/edit/src/blog/2019-06-17-hello-reason-react-native.md",source:"@site/blog/2019-06-17-hello-reason-react-native.md",title:"Hello Reason React Native",description:"Today is a big day for the ReasonML community as we are releasing the fruits of",date:"2019-06-17T00:00:00.000Z",formattedDate:"June 17, 2019",tags:[{label:"hello",permalink:"/blog/tags/hello"},{label:"reason",permalink:"/blog/tags/reason"}],readingTime:4.435,hasTruncateMarker:!1,authors:[{name:"MoOx",title:"ReScript React Native Core Team",url:"https://github.com/MoOx",imageURL:"https://avatars.githubusercontent.com/u/157534?v=4"}],frontMatter:{slug:"2019-06-17-hello-reason-react-native",title:"Hello Reason React Native",author:"MoOx",author_title:"ReScript React Native Core Team",author_url:"https://github.com/MoOx",author_image_url:"https://avatars.githubusercontent.com/u/157534?v=4",tags:["hello","reason"]},prevItem:{title:"Hello ReScript React Native",permalink:"/blog/2021-05-04-hello-rescript-react-native"}},l={authorsImageUrls:[void 0]},c=[{value:"Zero-cost",id:"zero-cost",level:2},{value:"But why reason-react-native
?",id:"but-why-reason-react-native-",level:2},{value:"Wait, what is bs-react-native-jsx3-compat
?",id:"wait-what-is-bs-react-native-jsx3-compat-",level:2},{value:"tl;dr",id:"tldr",level:2},{value:"Thanks",id:"thanks",level:2},{value:"What's next?",id:"whats-next",level:2}],p={toc:c},h="wrapper";function d(e){let{components:t,...a}=e;return(0,o.kt)(h,(0,n.Z)({},p,a,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"Today is a big day for the ReasonML community as we are releasing the fruits of\na long effort started about 4 months ago."),(0,o.kt)("p",null,"As more and more people were starting to use ReasonML on production apps using\nReact Native, we wanted to make the ReScript / BuckleScript bindings for React Native,\nknown has ",(0,o.kt)("inlineCode",{parentName:"p"},"bs-react-native"),", more accessible. This would have involved several\nbreaking changes in order to simplify some APIs that have been designed with a\nhigh level of security in mind, but at some costs. The cost of being harder to\nstart with (for newcomers to ReasonML) as well as the cost in terms of code size\nand performance."),(0,o.kt)("p",null,"While some of us were thinking about some simplifications, some others, involved\nin Reason React incoming changes, directly started a new approach for this\nbindings, following\n",(0,o.kt)("a",{parentName:"p",href:"https://reasonml.github.io/reason-react/blog/2019/04/10/react-hooks"},"the zero-cost approach offered by reason-react 0.7.0"),"."),(0,o.kt)("p",null,(0,o.kt)("a",{parentName:"p",href:"https://www.cca.io"},"CCA")," started this effort on what is now know as the new\n",(0,o.kt)("inlineCode",{parentName:"p"},"reason-react-native")," bindings, that eliminates a huge part of the additional\nJavaScript code produced by the bindings."),(0,o.kt)("h2",{id:"zero-cost"},"Zero-cost"),(0,o.kt)("p",null,"By zero-cost, we means zero additional cost. The JavaScript code ReScript / BuckleScript\nproduces using this bindings will most of the time directly hit React Native\nJavaScript code without creating an unnecessary abstraction above it \ud83d\ude4c."),(0,o.kt)("p",null,"Here are some random examples:"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"https://github.com/reason-react-native/reason-react-native/blob/958cd4e3a5ffa303304a0b2404cd53b5f49e649f/bs-react-native/src/components/ViewProps.bs.js"},(0,o.kt)("inlineCode",{parentName:"a"},"bs-react-native")," ",(0,o.kt)("inlineCode",{parentName:"a"},"View")),"\nvs\n",(0,o.kt)("a",{parentName:"li",href:"https://github.com/reason-react-native/reason-react-native/blob/958cd4e3a5ffa303304a0b2404cd53b5f49e649f/reason-react-native/src/components/View.bs.js"},(0,o.kt)("inlineCode",{parentName:"a"},"reason-react-native")," ",(0,o.kt)("inlineCode",{parentName:"a"},"View"))),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"https://github.com/reason-react-native/reason-react-native/blob/958cd4e3a5ffa303304a0b2404cd53b5f49e649f/bs-react-native/src/style.bs.js"},(0,o.kt)("inlineCode",{parentName:"a"},"bs-react-native")," ",(0,o.kt)("inlineCode",{parentName:"a"},"Style")),"\nvs\n",(0,o.kt)("a",{parentName:"li",href:"https://github.com/reason-react-native/reason-react-native/blob/958cd4e3a5ffa303304a0b2404cd53b5f49e649f/reason-react-native/src/apis/Style.bs.js"},(0,o.kt)("inlineCode",{parentName:"a"},"reason-react-native")," ",(0,o.kt)("inlineCode",{parentName:"a"},"Style"))),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"https://github.com/reason-react-native/reason-react-native/blob/958cd4e3a5ffa303304a0b2404cd53b5f49e649f/bs-react-native/src/platform.bs.js"},(0,o.kt)("inlineCode",{parentName:"a"},"bs-react-native")," ",(0,o.kt)("inlineCode",{parentName:"a"},"Platform")),"\nvs\n",(0,o.kt)("a",{parentName:"li",href:"https://github.com/reason-react-native/reason-react-native/blob/958cd4e3a5ffa303304a0b2404cd53b5f49e649f/reason-react-native/src/apis/Platform.bs.js"},(0,o.kt)("inlineCode",{parentName:"a"},"reason-react-native")," ",(0,o.kt)("inlineCode",{parentName:"a"},"Platform")))),(0,o.kt)("p",null,"Some modules are even empty or with some minor ",(0,o.kt)("inlineCode",{parentName:"p"},"require()")," that can be\nthemselves almost empty and easily removed by some JavaScript bundlers."),(0,o.kt)("p",null,"How cool is that?"),(0,o.kt)("h2",{id:"but-why-reason-react-native-"},"But why ",(0,o.kt)("inlineCode",{parentName:"h2"},"reason-react-native")," ?"),(0,o.kt)("p",null,(0,o.kt)("inlineCode",{parentName:"p"},"bs-react-native")," already had multiple breaking changes in the past and we\ndidn't really want to offer a poor experience by creating a new release with\ntons of changes that won't be easy to codemod (or would require much more work\nfrom us)."),(0,o.kt)("p",null,"On top of that, ",(0,o.kt)("inlineCode",{parentName:"p"},"reason-react")," latest release already added an important\nbreaking change with\n",(0,o.kt)("a",{parentName:"p",href:"https://reasonml.github.io/reason-react/docs/en/jsx"},"JSX 3"),"."),(0,o.kt)("p",null,"That's why we had this idea about offering an easy and smooth transition by\noffering 2 packages to say goodbye to ",(0,o.kt)("inlineCode",{parentName:"p"},"bs-react-native")," without pain."),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},"bs-react-native-jsx3-compat")," (0.11.1)"),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},"reason-react-native"),"\n(",(0,o.kt)("a",{parentName:"li",href:"/docs/install/#note-about-reason-react-native-version-number"},"0.60.0"),")")),(0,o.kt)("h2",{id:"wait-what-is-bs-react-native-jsx3-compat-"},"Wait, what is ",(0,o.kt)("inlineCode",{parentName:"h2"},"bs-react-native-jsx3-compat")," ?"),(0,o.kt)("p",null,(0,o.kt)("inlineCode",{parentName:"p"},"bs-react-native")," is using JSX 2 so in order to use it with JSX 3 we would have\nto create an additional layer on top of the current bindings to offer both JSX 2\nand 3 bindings. And since we wanted to do away with some current APIs of\n",(0,o.kt)("inlineCode",{parentName:"p"},"bs-react-native")," we started to think about a new approach."),(0,o.kt)("p",null,"We knew that we wanted to:"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},"offer to ",(0,o.kt)("inlineCode",{parentName:"li"},"bs-react-native")," users a migration plan, so they can start very\neasily to use JSX 3 and new ",(0,o.kt)("inlineCode",{parentName:"li"},"reason-react")," (so they can use hooks),"),(0,o.kt)("li",{parentName:"ul"},"offer new ",(0,o.kt)("inlineCode",{parentName:"li"},"reason-react-native")," bindings, more accessible and with a zero cost\napproach."),(0,o.kt)("li",{parentName:"ul"},"offer a smooth transition between these two packages so people can slowly\nupgrade their codebase without having to make an insane PR that switches from\none to the other.")),(0,o.kt)("p",null,"We don't want your co-workers to hate you with a PR that comes directly from\nhell \ud83d\ude05."),(0,o.kt)("p",null,"That's where we thought about offering ",(0,o.kt)("inlineCode",{parentName:"p"},"bs-react-native-jsx3-compat"),". It's a\npackage that has the same APIs ",(0,o.kt)("inlineCode",{parentName:"p"},"bs-react-native")," has but that uses\n",(0,o.kt)("inlineCode",{parentName:"p"},"reason-react-native")," under the hood."),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"This means you will have to make a migration from JSX 2 to 3"),". That's the\nonly thing you will have to do, then with a single change from ",(0,o.kt)("inlineCode",{parentName:"p"},"bs-react-native"),"\nwith ",(0,o.kt)("inlineCode",{parentName:"p"},"bs-react-native-jsx3-compat")," in your ",(0,o.kt)("inlineCode",{parentName:"p"},"bs-dependencies")," you will be ready\nto use hooks and directly benefit of (almost) zero-cost bindings!"),(0,o.kt)("p",null,"And since we care about you and don't want you to upgrade from JSX 2 to 3 by\nhand, we got you covered with a script made with love to help you with that."),(0,o.kt)("p",null,(0,o.kt)("a",{parentName:"p",href:"https://reason-react-native.github.io/en/docs/migration/jsx3/"},"You will find all the required instructions to migrate from ",(0,o.kt)("inlineCode",{parentName:"a"},"bs-react-native")," to ",(0,o.kt)("inlineCode",{parentName:"a"},"bs-react-native-jsx3-compat")," in our documentation"),"."),(0,o.kt)("h2",{id:"tldr"},"tl;dr"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},"bs-react-native")," has now entered a frozen state and won't receive any upgrade"),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},"bs-react-native-jsx3-compat")," allows you to use existing code based on\n",(0,o.kt)("inlineCode",{parentName:"li"},"bs-react-native")," with ",(0,o.kt)("inlineCode",{parentName:"li"},"reason-react")," 0.7.0 and JSX 3"),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},"reason-react-native")," package contains the new bindings for React Native, that\noffers more accessible APIs and that is almost zero-cost"),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"https://reason-react-native.github.io/en/docs/migration/jsx3/"},"We offer you an easy and smooth migration plan so you can start using ",(0,o.kt)("inlineCode",{parentName:"a"},"reason-react-native")," and slowly say bye to ",(0,o.kt)("inlineCode",{parentName:"a"},"bs-react-native")),".")),(0,o.kt)("h2",{id:"thanks"},"Thanks"),(0,o.kt)("p",null,"This required effort has been keeping us busy for weeks and wouldn't have been\npossible without the following people:"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},"CCA team and especially ",(0,o.kt)("a",{parentName:"li",href:"https://github.com/cknitt"},"@cknitt")," for leading us to\nthe right direction for the new zero-cost bindings and all the contributions\nthat come with this move"),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"https://github.com/sgny"},"@sgny")," for all his contributions to the new bindings"),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"https://github.com/MoOx"},"@MoOx")," for leading the effort, the compat layer and\nthe new website you are seeing here"),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"https://github.com/bloodyowl"},"@bloodyowl")," for his magical\n",(0,o.kt)("a",{parentName:"li",href:"https://github.com/bloodyowl/reason-react-compat"},"reason-react-compat")," layer\nand\n",(0,o.kt)("a",{parentName:"li",href:"https://bloodyowl.github.io/blog/2019-04-19-an-alternative-migration-path-for-reason-react/"},"the alternate JSX 3 upgrade path"),"\nthat goes with it"),(0,o.kt)("li",{parentName:"ul"},"all the people that helped us on Discord and GitHub in various code reviews\nand improvements like the react native template (thanks\n",(0,o.kt)("a",{parentName:"li",href:"https://github.com/dawee"},"@dawee"),")")),(0,o.kt)("h2",{id:"whats-next"},"What's next?"),(0,o.kt)("p",null,"Now that ",(0,o.kt)("inlineCode",{parentName:"p"},"reason-react-native")," is ready to be used and that our migration plan\nis usable, we will probably be focused on documentation as lots of APIs and\nComponents need to be documented. We really want to offer the best developer\nexperience possible and that's definitely part of it."),(0,o.kt)("p",null,"\ud83d\udc49Now it's time for you to check our\n",(0,o.kt)("a",{parentName:"p",href:"/docs/"},"Getting Started with Reason React Native documentation")))}d.isMDXComponent=!0}}]);
\ No newline at end of file
diff --git a/assets/js/99bdbcf8.be46a41c.js b/assets/js/99bdbcf8.be46a41c.js
new file mode 100644
index 0000000..44330e2
--- /dev/null
+++ b/assets/js/99bdbcf8.be46a41c.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunkrescript_react_native_github_io=self.webpackChunkrescript_react_native_github_io||[]).push([[6792],{3905:(e,t,r)=>{r.d(t,{Zo:()=>u,kt:()=>m});var n=r(7294);function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;t=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}var p=n.createContext({}),l=function(e){var t=n.useContext(p),r=t;return e&&(r="function"==typeof e?e(t):a(a({},t),e)),r},u=function(e){var t=l(e.components);return n.createElement(p.Provider,{value:t},e.children)},s="mdxType",v={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},f=n.forwardRef((function(e,t){var r=e.components,i=e.mdxType,o=e.originalType,p=e.parentName,u=c(e,["components","mdxType","originalType","parentName"]),s=l(r),f=i,m=s["".concat(p,".").concat(f)]||s[f]||v[f]||o;return r?n.createElement(m,a(a({ref:t},u),{},{components:r})):n.createElement(m,a({ref:t},u))}));function m(e,t){var r=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var o=r.length,a=new Array(o);a[0]=f;var c={};for(var p in t)hasOwnProperty.call(t,p)&&(c[p]=t[p]);c.originalType=e,c[s]="string"==typeof e?e:i,a[1]=c;for(var l=2;l{r.r(t),r.d(t,{assets:()=>p,contentTitle:()=>a,default:()=>v,frontMatter:()=>o,metadata:()=>c,toc:()=>l});var n=r(7462),i=(r(7294),r(3905));const o={id:"nativeeventemitter",title:"NativeEventEmitter",wip:!0},a=void 0,c={unversionedId:"nativeeventemitter",id:"nativeeventemitter",title:"NativeEventEmitter",description:"",source:"@site/docs/nativeeventemitter.md",sourceDirName:".",slug:"/nativeeventemitter",permalink:"/docs/nativeeventemitter",draft:!1,editUrl:"https://github.com/rescript-react-native/rescript-react-native.github.io/edit/src/docs/nativeeventemitter.md",tags:[],version:"current",frontMatter:{id:"nativeeventemitter",title:"NativeEventEmitter",wip:!0}},p={},l=[],u={toc:l},s="wrapper";function v(e){let{components:t,...r}=e;return(0,i.kt)(s,(0,n.Z)({},u,r,{components:t,mdxType:"MDXLayout"}))}v.isMDXComponent=!0}}]);
\ No newline at end of file
diff --git a/assets/js/9baa118e.8a4c1d04.js b/assets/js/9baa118e.8a4c1d04.js
new file mode 100644
index 0000000..01bad9c
--- /dev/null
+++ b/assets/js/9baa118e.8a4c1d04.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunkrescript_react_native_github_io=self.webpackChunkrescript_react_native_github_io||[]).push([[9743],{3905:(e,t,r)=>{r.d(t,{Zo:()=>u,kt:()=>y});var n=r(7294);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var s=n.createContext({}),p=function(e){var t=n.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):a(a({},t),e)),r},u=function(e){var t=p(e.components);return n.createElement(s.Provider,{value:t},e.children)},l="mdxType",f={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},d=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,i=e.originalType,s=e.parentName,u=c(e,["components","mdxType","originalType","parentName"]),l=p(r),d=o,y=l["".concat(s,".").concat(d)]||l[d]||f[d]||i;return r?n.createElement(y,a(a({ref:t},u),{},{components:r})):n.createElement(y,a({ref:t},u))}));function y(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var i=r.length,a=new Array(i);a[0]=d;var c={};for(var s in t)hasOwnProperty.call(t,s)&&(c[s]=t[s]);c.originalType=e,c[l]="string"==typeof e?e:o,a[1]=c;for(var p=2;p{r.r(t),r.d(t,{assets:()=>s,contentTitle:()=>a,default:()=>f,frontMatter:()=>i,metadata:()=>c,toc:()=>p});var n=r(7462),o=(r(7294),r(3905));const i={id:"apis",title:"APIs"},a=void 0,c={unversionedId:"apis",id:"apis",title:"APIs",description:"React Native provides a number of built-in APIs ready for you to use in your app. You can find them all in the left sidebar (or menu above, if you are on a narrow screen).",source:"@site/docs/apis.md",sourceDirName:".",slug:"/apis",permalink:"/docs/apis",draft:!1,editUrl:"https://github.com/rescript-react-native/rescript-react-native.github.io/edit/src/docs/apis.md",tags:[],version:"current",frontMatter:{id:"apis",title:"APIs"},sidebar:"api",next:{title:"AccessibilityInfo",permalink:"/docs/accessibilityinfo"}},s={},p=[],u={toc:p},l="wrapper";function f(e){let{components:t,...r}=e;return(0,o.kt)(l,(0,n.Z)({},u,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"React Native provides a number of built-in APIs ready for you to use in your app. You can find them all in the left sidebar (or menu above, if you are on a narrow screen)."))}f.isMDXComponent=!0}}]);
\ No newline at end of file
diff --git a/assets/js/9e4087bc.60f07517.js b/assets/js/9e4087bc.60f07517.js
new file mode 100644
index 0000000..10d02c7
--- /dev/null
+++ b/assets/js/9e4087bc.60f07517.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunkrescript_react_native_github_io=self.webpackChunkrescript_react_native_github_io||[]).push([[3608],{3169:(e,t,a)=>{a.r(t),a.d(t,{default:()=>o});var r=a(7294),l=a(9960),n=a(5999),c=a(833),i=a(7452);function m(e){let{year:t,posts:a}=e;return r.createElement(r.Fragment,null,r.createElement("h3",null,t),r.createElement("ul",null,a.map((e=>r.createElement("li",{key:e.metadata.date},r.createElement(l.Z,{to:e.metadata.permalink},e.metadata.formattedDate," - ",e.metadata.title))))))}function s(e){let{years:t}=e;return r.createElement("section",{className:"margin-vert--lg"},r.createElement("div",{className:"container"},r.createElement("div",{className:"row"},t.map(((e,t)=>r.createElement("div",{key:t,className:"col col--4 margin-vert--lg"},r.createElement(m,e)))))))}function o(e){let{archive:t}=e;const a=(0,n.I)({id:"theme.blog.archive.title",message:"Archive",description:"The page & hero title of the blog archive page"}),l=(0,n.I)({id:"theme.blog.archive.description",message:"Archive",description:"The page & hero description of the blog archive page"}),m=function(e){const t=e.reduceRight(((e,t)=>{const a=t.metadata.date.split("-")[0],r=e.get(a)??[];return e.set(a,[t,...r])}),new Map);return Array.from(t,(e=>{let[t,a]=e;return{year:t,posts:a}}))}(t.blogPosts);return r.createElement(r.Fragment,null,r.createElement(c.d,{title:a,description:l}),r.createElement(i.Z,null,r.createElement("header",{className:"hero hero--primary"},r.createElement("div",{className:"container"},r.createElement("h1",{className:"hero__title"},a),r.createElement("p",{className:"hero__subtitle"},l))),r.createElement("main",null,m.length>0&&r.createElement(s,{years:m}))))}}}]);
\ No newline at end of file
diff --git a/assets/js/9e908f88.678bbee9.js b/assets/js/9e908f88.678bbee9.js
new file mode 100644
index 0000000..714ba7a
--- /dev/null
+++ b/assets/js/9e908f88.678bbee9.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunkrescript_react_native_github_io=self.webpackChunkrescript_react_native_github_io||[]).push([[1824],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>y});var a=n(7294);function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function i(e){for(var t=1;t=0||(l[n]=e[n]);return l}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(l[n]=e[n])}return l}var s=a.createContext({}),p=function(e){var t=a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},c=function(e){var t=p(e.components);return a.createElement(s.Provider,{value:t},e.children)},d="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},h=a.forwardRef((function(e,t){var n=e.components,l=e.mdxType,r=e.originalType,s=e.parentName,c=o(e,["components","mdxType","originalType","parentName"]),d=p(n),h=l,y=d["".concat(s,".").concat(h)]||d[h]||u[h]||r;return n?a.createElement(y,i(i({ref:t},c),{},{components:n})):a.createElement(y,i({ref:t},c))}));function y(e,t){var n=arguments,l=t&&t.mdxType;if("string"==typeof e||l){var r=n.length,i=new Array(r);i[0]=h;var o={};for(var s in t)hasOwnProperty.call(t,s)&&(o[s]=t[s]);o.originalType=e,o[d]="string"==typeof e?e:l,i[1]=o;for(var p=2;p{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>i,default:()=>u,frontMatter:()=>r,metadata:()=>o,toc:()=>p});var a=n(7462),l=(n(7294),n(3905));const r={id:"stylesheet",title:"StyleSheet",officialDoc:"https://reactnative.dev/docs/stylesheet"},i=void 0,o={unversionedId:"stylesheet",id:"stylesheet",title:"StyleSheet",description:"StyleSheet mainly has a method to create an object containing many",source:"@site/docs/stylesheet.md",sourceDirName:".",slug:"/stylesheet",permalink:"/docs/stylesheet",draft:!1,editUrl:"https://github.com/rescript-react-native/rescript-react-native.github.io/edit/src/docs/stylesheet.md",tags:[],version:"current",frontMatter:{id:"stylesheet",title:"StyleSheet",officialDoc:"https://reactnative.dev/docs/stylesheet"},sidebar:"api",previous:{title:"Style",permalink:"/docs/style"},next:{title:"ToastAndroid",permalink:"/docs/toastandroid"}},s={},p=[{value:"Methods",id:"methods",level:2},{value:"create
",id:"create",level:3},{value:"flatten
",id:"flatten",level:3},{value:"Constants",id:"constants",level:2},{value:"hairlineWidth
",id:"hairlinewidth",level:3},{value:"absoluteFill
",id:"absolutefill",level:3},{value:"absoluteFillObject
",id:"absolutefillobject",level:3},{value:"Example",id:"example",level:2}],c={toc:p},d="wrapper";function u(e){let{components:t,...n}=e;return(0,l.kt)(d,(0,a.Z)({},c,n,{components:t,mdxType:"MDXLayout"}),(0,l.kt)("p",null,(0,l.kt)("inlineCode",{parentName:"p"},"StyleSheet")," mainly has a method to ",(0,l.kt)("a",{parentName:"p",href:"#create"},"create")," an object containing many\nstyles, similar to a CSS StyleSheet. This is helpful to keep style definitions\nat fewer locations, away from the render function. Separating concerns in your\ncode in this manner should help readability. Named styles might also help\ndifferentiate between your components. Finally, allowing components to refer to\nstyles by ID, it also reduces the amount of data transferred over the JS bridge."),(0,l.kt)("p",null,"There is also a ",(0,l.kt)("a",{parentName:"p",href:"#flatten"},(0,l.kt)("inlineCode",{parentName:"a"},"flatten"))," method to merge multiple styles into a\nsingle style and several ",(0,l.kt)("a",{parentName:"p",href:"#constants"},"constants")," for commonly used style\ndefinitions."),(0,l.kt)("h2",{id:"methods"},"Methods"),(0,l.kt)("h3",{id:"create"},(0,l.kt)("inlineCode",{parentName:"h3"},"create")),(0,l.kt)("p",null,"Takes and returns ",(0,l.kt)("inlineCode",{parentName:"p"},"Js.t<'a>")," objects, with ",(0,l.kt)("inlineCode",{parentName:"p"},"string")," keys and ",(0,l.kt)("inlineCode",{parentName:"p"},"Style.t")," values.\nIndividual styles can be accessed using ",(0,l.kt)("inlineCode",{parentName:"p"},"##"),", followed by the name specified as\nthe key."),(0,l.kt)("p",null,"Note that using ",(0,l.kt)("inlineCode",{parentName:"p"},"Style.array")," or ",(0,l.kt)("inlineCode",{parentName:"p"},"Style.list")," to pass ",(0,l.kt)("inlineCode",{parentName:"p"},"array")," or\n",(0,l.kt)("inlineCode",{parentName:"p"},"list")," is illegal within a ",(0,l.kt)("inlineCode",{parentName:"p"},"StyleSheet"),", even those are valid ",(0,l.kt)("inlineCode",{parentName:"p"},"style"),"\nprops for components. You may, howevever, use the ",(0,l.kt)("a",{parentName:"p",href:"#flatten"},(0,l.kt)("inlineCode",{parentName:"a"},"flatten"))," method\nto convert ",(0,l.kt)("inlineCode",{parentName:"p"},"array")," into a valid ",(0,l.kt)("inlineCode",{parentName:"p"},"Style.t")," object."),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-rescript"},"create: Js.t<'a> => Js.t<'a>\n")),(0,l.kt)("h3",{id:"flatten"},(0,l.kt)("inlineCode",{parentName:"h3"},"flatten")),(0,l.kt)("p",null,"Takes an array of styles (of type ",(0,l.kt)("inlineCode",{parentName:"p"},"Style.t"),") and returns a single style (also of\ntype ",(0,l.kt)("inlineCode",{parentName:"p"},"Style.t"),"). Creates a ",(0,l.kt)("inlineCode",{parentName:"p"},"Style.t")," object which is valid in a ",(0,l.kt)("inlineCode",{parentName:"p"},"StyleSheet"),"."),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-rescript"},"flatten: array => Style.t\n")),(0,l.kt)("h2",{id:"constants"},"Constants"),(0,l.kt)("h3",{id:"hairlinewidth"},(0,l.kt)("inlineCode",{parentName:"h3"},"hairlineWidth")),(0,l.kt)("p",null,"To ensure the resulting line will look sharp, this specifies an integer number\nof pixels which should approximate the standard thickness of a thin line on the\nplatform given the screen density."),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-rescript"},"hairlineWidth: float\n")),(0,l.kt)("h3",{id:"absolutefill"},(0,l.kt)("inlineCode",{parentName:"h3"},"absoluteFill")),(0,l.kt)("p",null,"This is the style"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-js"},"{\n position: 'absolute',\n left: 0,\n right: 0,\n top: 0,\n bottom: 0\n}\n")),(0,l.kt)("p",null,"which is frequently used to create overlays. A common use is to add these props\nto a style using the spread operator (",(0,l.kt)("inlineCode",{parentName:"p"},"..."),"), but as ReScript does not allow the\noperator when fields are not explicitly set, you may use the ",(0,l.kt)("inlineCode",{parentName:"p"},"flatten")," method\ninstead."),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-rescript"},"absoluteFill: Style.t\n")),(0,l.kt)("h3",{id:"absolutefillobject"},(0,l.kt)("inlineCode",{parentName:"h3"},"absoluteFillObject")),(0,l.kt)("p",null,"This is identical to ",(0,l.kt)("inlineCode",{parentName:"p"},"absoluteFill")," when used with pure functions."),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-rescript"},"absoluteFillObject: Style.t\n")),(0,l.kt)("h2",{id:"example"},"Example"),(0,l.kt)("p",null,"Please also see the ",(0,l.kt)("a",{parentName:"p",href:"/docs/style/#style-example"},"example")," in documentation of the\n",(0,l.kt)("inlineCode",{parentName:"p"},"Style")," API."),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-rescript"},'open ReactNative\n\nlet borderStyle = {\n open Style\n style(~borderWidth=StyleSheet.hairlineWidth, ())\n}\n\nlet styles = {\n open Style\n StyleSheet.create({\n // style may be defined inline\n "container": style(~flex=1., ~flexDirection=#column, ()),\n "screen": style(~width=windowWidth->dp, ()),\n // or already defined elsewhere\n "borderStyle": borderStyle,\n "overlay": StyleSheet.absoluteFill,\n })\n}\n\nlet flatStyle = StyleSheet.flatten([styles["container"], styles["screen"]])\n')))}u.isMDXComponent=!0}}]);
\ No newline at end of file
diff --git a/assets/js/9f05bbac.faba0c17.js b/assets/js/9f05bbac.faba0c17.js
new file mode 100644
index 0000000..074c38a
--- /dev/null
+++ b/assets/js/9f05bbac.faba0c17.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunkrescript_react_native_github_io=self.webpackChunkrescript_react_native_github_io||[]).push([[4335],{3905:(e,t,r)=>{r.d(t,{Zo:()=>p,kt:()=>m});var n=r(7294);function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function c(e){for(var t=1;t=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}var s=n.createContext({}),l=function(e){var t=n.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):c(c({},t),e)),r},p=function(e){var t=l(e.components);return n.createElement(s.Provider,{value:t},e.children)},u="mdxType",f={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},d=n.forwardRef((function(e,t){var r=e.components,i=e.mdxType,o=e.originalType,s=e.parentName,p=a(e,["components","mdxType","originalType","parentName"]),u=l(r),d=i,m=u["".concat(s,".").concat(d)]||u[d]||f[d]||o;return r?n.createElement(m,c(c({ref:t},p),{},{components:r})):n.createElement(m,c({ref:t},p))}));function m(e,t){var r=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var o=r.length,c=new Array(o);c[0]=d;var a={};for(var s in t)hasOwnProperty.call(t,s)&&(a[s]=t[s]);a.originalType=e,a[u]="string"==typeof e?e:i,c[1]=a;for(var l=2;l{r.r(t),r.d(t,{assets:()=>s,contentTitle:()=>c,default:()=>f,frontMatter:()=>o,metadata:()=>a,toc:()=>l});var n=r(7462),i=(r(7294),r(3905));const o={id:"sectionlist",title:"SectionList",wip:!0},c=void 0,a={unversionedId:"sectionlist",id:"sectionlist",title:"SectionList",description:"",source:"@site/docs/sectionlist.md",sourceDirName:".",slug:"/sectionlist",permalink:"/docs/sectionlist",draft:!1,editUrl:"https://github.com/rescript-react-native/rescript-react-native.github.io/edit/src/docs/sectionlist.md",tags:[],version:"current",frontMatter:{id:"sectionlist",title:"SectionList",wip:!0},sidebar:"components",previous:{title:"ScrollView",permalink:"/docs/scrollview"},next:{title:"StatusBar",permalink:"/docs/statusbar"}},s={},l=[],p={toc:l},u="wrapper";function f(e){let{components:t,...r}=e;return(0,i.kt)(u,(0,n.Z)({},p,r,{components:t,mdxType:"MDXLayout"}))}f.isMDXComponent=!0}}]);
\ No newline at end of file
diff --git a/assets/js/a184b298.b13910d2.js b/assets/js/a184b298.b13910d2.js
new file mode 100644
index 0000000..0a5aef4
--- /dev/null
+++ b/assets/js/a184b298.b13910d2.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunkrescript_react_native_github_io=self.webpackChunkrescript_react_native_github_io||[]).push([[7667],{3905:(e,t,r)=>{r.d(t,{Zo:()=>l,kt:()=>m});var n=r(7294);function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function o(e){for(var t=1;t=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}var c=n.createContext({}),s=function(e){var t=n.useContext(c),r=t;return e&&(r="function"==typeof e?e(t):o(o({},t),e)),r},l=function(e){var t=s(e.components);return n.createElement(c.Provider,{value:t},e.children)},u="mdxType",f={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},y=n.forwardRef((function(e,t){var r=e.components,i=e.mdxType,a=e.originalType,c=e.parentName,l=p(e,["components","mdxType","originalType","parentName"]),u=s(r),y=i,m=u["".concat(c,".").concat(y)]||u[y]||f[y]||a;return r?n.createElement(m,o(o({ref:t},l),{},{components:r})):n.createElement(m,o({ref:t},l))}));function m(e,t){var r=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var a=r.length,o=new Array(a);o[0]=y;var p={};for(var c in t)hasOwnProperty.call(t,c)&&(p[c]=t[c]);p.originalType=e,p[u]="string"==typeof e?e:i,o[1]=p;for(var s=2;s{r.r(t),r.d(t,{assets:()=>c,contentTitle:()=>o,default:()=>f,frontMatter:()=>a,metadata:()=>p,toc:()=>s});var n=r(7462),i=(r(7294),r(3905));const a={id:"appregistry",title:"AppRegistry",wip:!0},o=void 0,p={unversionedId:"appregistry",id:"appregistry",title:"AppRegistry",description:"",source:"@site/docs/appregistry.md",sourceDirName:".",slug:"/appregistry",permalink:"/docs/appregistry",draft:!1,editUrl:"https://github.com/rescript-react-native/rescript-react-native.github.io/edit/src/docs/appregistry.md",tags:[],version:"current",frontMatter:{id:"appregistry",title:"AppRegistry",wip:!0},sidebar:"api",previous:{title:"AnimationFrame",permalink:"/docs/animationframe"},next:{title:"AppState",permalink:"/docs/appstate"}},c={},s=[],l={toc:s},u="wrapper";function f(e){let{components:t,...r}=e;return(0,i.kt)(u,(0,n.Z)({},l,r,{components:t,mdxType:"MDXLayout"}))}f.isMDXComponent=!0}}]);
\ No newline at end of file
diff --git a/assets/js/a2026f74.625205cb.js b/assets/js/a2026f74.625205cb.js
new file mode 100644
index 0000000..8a6a8b7
--- /dev/null
+++ b/assets/js/a2026f74.625205cb.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunkrescript_react_native_github_io=self.webpackChunkrescript_react_native_github_io||[]).push([[152],{3905:(e,t,r)=>{r.d(t,{Zo:()=>s,kt:()=>b});var n=r(7294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function c(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var l=n.createContext({}),p=function(e){var t=n.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):c(c({},t),e)),r},s=function(e){var t=p(e.components);return n.createElement(l.Provider,{value:t},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},f=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,o=e.originalType,l=e.parentName,s=i(e,["components","mdxType","originalType","parentName"]),u=p(r),f=a,b=u["".concat(l,".").concat(f)]||u[f]||d[f]||o;return r?n.createElement(b,c(c({ref:t},s),{},{components:r})):n.createElement(b,c({ref:t},s))}));function b(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=r.length,c=new Array(o);c[0]=f;var i={};for(var l in t)hasOwnProperty.call(t,l)&&(i[l]=t[l]);i.originalType=e,i[u]="string"==typeof e?e:a,c[1]=i;for(var p=2;p{r.r(t),r.d(t,{assets:()=>l,contentTitle:()=>c,default:()=>d,frontMatter:()=>o,metadata:()=>i,toc:()=>p});var n=r(7462),a=(r(7294),r(3905));const o={id:"backhandler",title:"BackHandler",wip:!0},c=void 0,i={unversionedId:"backhandler",id:"backhandler",title:"BackHandler",description:"",source:"@site/docs/backhandler.md",sourceDirName:".",slug:"/backhandler",permalink:"/docs/backhandler",draft:!1,editUrl:"https://github.com/rescript-react-native/rescript-react-native.github.io/edit/src/docs/backhandler.md",tags:[],version:"current",frontMatter:{id:"backhandler",title:"BackHandler",wip:!0},sidebar:"api",previous:{title:"AppState",permalink:"/docs/appstate"},next:{title:"Dimensions",permalink:"/docs/dimensions"}},l={},p=[],s={toc:p},u="wrapper";function d(e){let{components:t,...r}=e;return(0,a.kt)(u,(0,n.Z)({},s,r,{components:t,mdxType:"MDXLayout"}))}d.isMDXComponent=!0}}]);
\ No newline at end of file
diff --git a/assets/js/a6aa9e1f.953dce49.js b/assets/js/a6aa9e1f.953dce49.js
new file mode 100644
index 0000000..3a765ee
--- /dev/null
+++ b/assets/js/a6aa9e1f.953dce49.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunkrescript_react_native_github_io=self.webpackChunkrescript_react_native_github_io||[]).push([[3089],{46:(e,t,a)=>{a.r(t),a.d(t,{default:()=>d});var n=a(7294),r=a(6010),l=a(2263),i=a(833),o=a(5281),s=a(9058),c=a(9703),m=a(197),g=a(9985);function p(e){const{metadata:t}=e,{siteConfig:{title:a}}=(0,l.Z)(),{blogDescription:r,blogTitle:o,permalink:s}=t,c="/"===s?a:o;return n.createElement(n.Fragment,null,n.createElement(i.d,{title:c,description:r}),n.createElement(m.Z,{tag:"blog_posts_list"}))}function u(e){const{metadata:t,items:a,sidebar:r}=e;return n.createElement(s.Z,{sidebar:r},n.createElement(g.Z,{items:a}),n.createElement(c.Z,{metadata:t}))}function d(e){return n.createElement(i.FG,{className:(0,r.Z)(o.k.wrapper.blogPages,o.k.page.blogListPage)},n.createElement(p,e),n.createElement(u,e))}},9703:(e,t,a)=>{a.d(t,{Z:()=>i});var n=a(7294),r=a(5999),l=a(2244);function i(e){const{metadata:t}=e,{previousPage:a,nextPage:i}=t;return n.createElement("nav",{className:"pagination-nav","aria-label":(0,r.I)({id:"theme.blog.paginator.navAriaLabel",message:"Blog list page navigation",description:"The ARIA label for the blog pagination"})},a&&n.createElement(l.Z,{permalink:a,title:n.createElement(r.Z,{id:"theme.blog.paginator.newerEntries",description:"The label used to navigate to the newer blog posts page (previous page)"},"Newer Entries")}),i&&n.createElement(l.Z,{permalink:i,title:n.createElement(r.Z,{id:"theme.blog.paginator.olderEntries",description:"The label used to navigate to the older blog posts page (next page)"},"Older Entries"),isNext:!0}))}},9985:(e,t,a)=>{a.d(t,{Z:()=>i});var n=a(7294),r=a(9460),l=a(390);function i(e){let{items:t,component:a=l.Z}=e;return n.createElement(n.Fragment,null,t.map((e=>{let{content:t}=e;return n.createElement(r.n,{key:t.metadata.permalink,content:t},n.createElement(a,null,n.createElement(t,null)))})))}}}]);
\ No newline at end of file
diff --git a/assets/js/a7023ddc.026ee4bb.js b/assets/js/a7023ddc.026ee4bb.js
new file mode 100644
index 0000000..e8dc197
--- /dev/null
+++ b/assets/js/a7023ddc.026ee4bb.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunkrescript_react_native_github_io=self.webpackChunkrescript_react_native_github_io||[]).push([[1713],{3457:e=>{e.exports=JSON.parse('[{"label":"hello","permalink":"/blog/tags/hello","count":2},{"label":"rescript","permalink":"/blog/tags/rescript","count":1},{"label":"reason","permalink":"/blog/tags/reason","count":1}]')}}]);
\ No newline at end of file
diff --git a/assets/js/a70ca05f.b2e30d32.js b/assets/js/a70ca05f.b2e30d32.js
new file mode 100644
index 0000000..beb68d4
--- /dev/null
+++ b/assets/js/a70ca05f.b2e30d32.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunkrescript_react_native_github_io=self.webpackChunkrescript_react_native_github_io||[]).push([[2339],{3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>f});var r=n(7294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var c=r.createContext({}),s=function(e){var t=r.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},p=function(e){var t=s(e.components);return r.createElement(c.Provider,{value:t},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,c=e.parentName,p=i(e,["components","mdxType","originalType","parentName"]),u=s(n),m=a,f=u["".concat(c,".").concat(m)]||u[m]||d[m]||o;return n?r.createElement(f,l(l({ref:t},p),{},{components:n})):r.createElement(f,l({ref:t},p))}));function f(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,l=new Array(o);l[0]=m;var i={};for(var c in t)hasOwnProperty.call(t,c)&&(i[c]=t[c]);i.originalType=e,i[u]="string"==typeof e?e:a,l[1]=i;for(var s=2;s{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>l,default:()=>d,frontMatter:()=>o,metadata:()=>i,toc:()=>s});var r=n(7462),a=(n(7294),n(3905));const o={id:"global",title:"Global",autoLinkToOfficialDoc:!1},l=void 0,i={unversionedId:"global",id:"global",title:"Global",description:"This module contains various APIs & flags that are in JavaScript global scope.",source:"@site/docs/global.md",sourceDirName:".",slug:"/global",permalink:"/docs/global",draft:!1,editUrl:"https://github.com/rescript-react-native/rescript-react-native.github.io/edit/src/docs/global.md",tags:[],version:"current",frontMatter:{id:"global",title:"Global",autoLinkToOfficialDoc:!1},sidebar:"api",previous:{title:"Event",permalink:"/docs/event"},next:{title:"InteractionManager",permalink:"/docs/interactionmanager"}},c={},s=[{value:"Global.__DEV__
",id:"global__dev__",level:2},{value:"Global.hermesInternal
",id:"globalhermesinternal",level:2}],p={toc:s},u="wrapper";function d(e){let{components:t,...n}=e;return(0,a.kt)(u,(0,r.Z)({},p,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"This module contains various APIs & flags that are in JavaScript global scope."),(0,a.kt)("h2",{id:"global__dev__"},(0,a.kt)("inlineCode",{parentName:"h2"},"Global.__DEV__")),(0,a.kt)("p",null,"This is the development flag known in JavaScript as just\n",(0,a.kt)("a",{parentName:"p",href:"https://reactnative.dev/docs/javascript-environment"},(0,a.kt)("inlineCode",{parentName:"a"},"__DEV__")),"."),(0,a.kt)("p",null,"You can use it like this:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-rescript"},'open ReactNative\n\nlet environmentText = if Global.__DEV__ {\n "This is development"\n}\nelse {\n "This is production"\n}\n')),(0,a.kt)("h2",{id:"globalhermesinternal"},(0,a.kt)("inlineCode",{parentName:"h2"},"Global.hermesInternal")),(0,a.kt)("p",null,"This is the ",(0,a.kt)("inlineCode",{parentName:"p"},"HermesInternal")," value known in JavaScript as\n",(0,a.kt)("a",{parentName:"p",href:"https://reactnative.dev/docs/hermes"},(0,a.kt)("inlineCode",{parentName:"a"},"global.HermesInternal")),"."),(0,a.kt)("p",null,"You can use it like this:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-rescript"},"open ReactNative\n\nlet isHermes = () => Global.hermesInternal != None\n")))}d.isMDXComponent=!0}}]);
\ No newline at end of file
diff --git a/assets/js/a7603ff3.a9ea2ea8.js b/assets/js/a7603ff3.a9ea2ea8.js
new file mode 100644
index 0000000..de881e8
--- /dev/null
+++ b/assets/js/a7603ff3.a9ea2ea8.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunkrescript_react_native_github_io=self.webpackChunkrescript_react_native_github_io||[]).push([[8468],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>v});var a=n(7294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function o(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var s=a.createContext({}),p=function(e){var t=a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},c=function(e){var t=p(e.components);return a.createElement(s.Provider,{value:t},e.children)},d="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},y=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,l=e.originalType,s=e.parentName,c=i(e,["components","mdxType","originalType","parentName"]),d=p(n),y=r,v=d["".concat(s,".").concat(y)]||d[y]||u[y]||l;return n?a.createElement(v,o(o({ref:t},c),{},{components:n})):a.createElement(v,o({ref:t},c))}));function v(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=n.length,o=new Array(l);o[0]=y;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i[d]="string"==typeof e?e:r,o[1]=i;for(var p=2;p{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>o,default:()=>u,frontMatter:()=>l,metadata:()=>i,toc:()=>p});var a=n(7462),r=(n(7294),n(3905));const l={id:"event",title:"Event",officialDoc:"https://github.com/facebook/react-native/blob/main/Libraries/Types/CoreEventTypes.js"},o=void 0,i={unversionedId:"event",id:"event",title:"Event",description:"These are the types of objects returned in Event callbacks. Types are",source:"@site/docs/event.md",sourceDirName:".",slug:"/event",permalink:"/docs/event",draft:!1,editUrl:"https://github.com/rescript-react-native/rescript-react-native.github.io/edit/src/docs/event.md",tags:[],version:"current",frontMatter:{id:"event",title:"Event",officialDoc:"https://github.com/facebook/react-native/blob/main/Libraries/Types/CoreEventTypes.js"},sidebar:"api",previous:{title:"Easing",permalink:"/docs/easing"},next:{title:"Global",permalink:"/docs/global"}},s={},p=[{value:"Parametrised Types",id:"parametrised-types",level:2},{value:"syntheticEvent<'a>
",id:"syntheticeventa",level:3},{value:"responderSyntheticEvent<'a>
",id:"respondersyntheticeventa",level:3},{value:"Types",id:"types",level:2},{value:"layoutEvent
",id:"layoutevent",level:3},{value:"pressEvent
",id:"pressevent",level:3},{value:"scrollEvent
",id:"scrollevent",level:3},{value:"switchChangeEvent
",id:"switchchangeevent",level:3},{value:"targetEvent
",id:"targetevent",level:3},{value:"textLayoutEvent
",id:"textlayoutevent",level:3}],c={toc:p},d="wrapper";function u(e){let{components:t,...n}=e;return(0,r.kt)(d,(0,a.Z)({},c,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"These are the types of objects returned in ",(0,r.kt)("inlineCode",{parentName:"p"},"Event")," callbacks. Types are\ninstances of ",(0,r.kt)("inlineCode",{parentName:"p"},"syntheticEvent<'a>")," and ",(0,r.kt)("inlineCode",{parentName:"p"},"responderSyntheticEvent<'a>"),"."),(0,r.kt)("h2",{id:"parametrised-types"},"Parametrised Types"),(0,r.kt)("h3",{id:"syntheticeventa"},(0,r.kt)("inlineCode",{parentName:"h3"},"syntheticEvent<'a>")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rescript"},"type syntheticEvent<'a> = {\n bubbles: Js.Nullable.t,\n cancelable: Js.Nullable.t,\n currentTarget: float,\n defaultPrevented: Js.Nullable.t,\n dispatchConfig: registrationName,\n eventPhase: Js.Nullable.t,\n isTrusted: Js.Nullable.t,\n nativeEvent: T._payload,\n target: Js.Nullable.t,\n timeStamp: float,\n _type: Js.Nullable.t,\n}\n")),(0,r.kt)("h3",{id:"respondersyntheticeventa"},(0,r.kt)("inlineCode",{parentName:"h3"},"responderSyntheticEvent<'a>")),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"responderSyntheticEvent<'a>")," adds the ",(0,r.kt)("inlineCode",{parentName:"p"},"touchHistory")," key to\n",(0,r.kt)("inlineCode",{parentName:"p"},"syntheticEvent<'a>")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rescript"},"type responderSyntheticEvent<'a> = {\n bubbles: Js.Nullable.t,\n cancelable: Js.Nullable.t,\n currentTarget: float,\n defaultPrevented: Js.Nullable.t,\n dispatchConfig: registrationName,\n eventPhase: Js.Nullable.t,\n isTrusted: Js.Nullable.t,\n nativeEvent: T._payload,\n target: Js.Nullable.t,\n timeStamp: float,\n _type: Js.Nullable.t