{"id":1581,"date":"2023-03-25T19:28:19","date_gmt":"2023-03-25T11:28:19","guid":{"rendered":"https:\/\/www.appblog.cn\/?p=1581"},"modified":"2023-04-27T21:30:45","modified_gmt":"2023-04-27T13:30:45","slug":"react-has-a-white-screen-issue-when-opening-an-android-browser","status":"publish","type":"post","link":"https:\/\/www.appblog.cn\/index.php\/2023\/03\/25\/react-has-a-white-screen-issue-when-opening-an-android-browser\/","title":{"rendered":"React\u5728\u5b89\u5353\u6d4f\u89c8\u5668\u6253\u5f00\u767d\u5c4f\u95ee\u9898"},"content":{"rendered":"<p>\u57fa\u4e8eReact\u7684\u524d\u7aef\u9879\u76ee\uff0c\u5728PC\u7aef\u548ciOS\u81ea\u5e26\u6d4f\u89c8\u5668\u4e0a\u90fd\u53ef\u4ee5\u8fd0\u884c\uff0c\u4f46\u62ff\u5230\u5b89\u5353\u673a\u5668\u7684\u6d4f\u89c8\u5668\u4e0a\u663e\u793a\u767d\u5c4f\uff0c\u8c37\u6b4c\u4e86\u4e00\u4e0b\uff0c\u53d1\u73b0\u662fbabel\u7684\u95ee\u9898\u3002<\/p>\n<blockquote>\n<p>Babel\u9ed8\u8ba4\u53ea\u8f6c\u6362\u65b0\u7684JavaScript\u53e5\u6cd5\uff08syntax\uff09\uff0c\u800c\u4e0d\u8f6c\u6362\u65b0\u7684API\uff0c\u6bd4\u5982<code>Iterator<\/code>\u3001<code>Generator<\/code>\u3001<code>Set<\/code>\u3001<code>Maps<\/code>\u3001<code>Proxy<\/code>\u3001<code>Reflect<\/code>\u3001<code>Symbol<\/code>\u3001<code>Promise<\/code>\u7b49\u5168\u5c40\u5bf9\u8c61\uff0c\u4ee5\u53ca\u4e00\u4e9b\u5b9a\u4e49\u5728\u5168\u5c40\u5bf9\u8c61\u4e0a\u7684\u65b9\u6cd5\uff08\u6bd4\u5982<code>Object.assign<\/code>\uff09\u90fd\u4e0d\u4f1a\u8f6c\u7801\u3002<\/p>\n<\/blockquote>\n<p><!-- more --><\/p>\n<p>\u4e3e\u4f8b\u6765\u8bf4\uff0cES6\u5728Array\u5bf9\u8c61\u4e0a\u65b0\u589e\u4e86<code>Array.from<\/code>\u65b9\u6cd5\uff0cBabel\u5c31\u4e0d\u4f1a\u8f6c\u7801\u8fd9\u4e2a\u65b9\u6cd5\u3002\u5982\u679c\u60f3\u8ba9\u8fd9\u4e2a\u65b9\u6cd5\u8fd0\u884c\uff0c\u5fc5\u987b\u4f7f\u7528<code>babel-polyfill<\/code>\uff0c\u4e3a\u5f53\u524d\u73af\u5883\u63d0\u4f9b\u4e00\u4e2a\u57ab\u7247\u3002<\/p>\n<p>\u89e3\u51b3\u65b9\u6cd5\u662f\u5b89\u88c5<code>babel-polyfill<\/code><\/p>\n<pre><code class=\"language-bash\">$ npm install --save babel-polyfill<\/code><\/pre>\n<p>\u7136\u540e\u5728\u5165\u53e3\u6587\u4ef6\u4e2d\u6dfb\u52a0<\/p>\n<pre><code class=\"language-javascript\">import &#039;babel-polyfill&#039;;<\/code><\/pre>\n<p>\u518d\u6b21\u8fd0\u884c\u5373\u53ef<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u57fa\u4e8eReact\u7684\u524d\u7aef\u9879\u76ee\uff0c\u5728PC\u7aef\u548ciOS\u81ea\u5e26\u6d4f\u89c8\u5668\u4e0a\u90fd\u53ef\u4ee5\u8fd0\u884c\uff0c\u4f46\u62ff\u5230\u5b89\u5353\u673a\u5668\u7684\u6d4f\u89c8\u5668\u4e0a\u663e\u793a\u767d\u5c4f\uff0c\u8c37\u6b4c\u4e86\u4e00\u4e0b [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[36],"tags":[396],"class_list":["post-1581","post","type-post","status-publish","format-standard","hentry","category-react","tag-396"],"_links":{"self":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/1581","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/comments?post=1581"}],"version-history":[{"count":0,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/1581\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/media?parent=1581"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/categories?post=1581"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/tags?post=1581"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}