<i id='rIrnd'><tr id='rIrnd'><dt id='rIrnd'><q id='rIrnd'><span id='rIrnd'><b id='rIrnd'><form id='rIrnd'><ins id='rIrnd'></ins><ul id='rIrnd'></ul><sub id='rIrnd'></sub></form><legend id='rIrnd'></legend><bdo id='rIrnd'><pre id='rIrnd'><center id='rIrnd'></center></pre></bdo></b><th id='rIrnd'></th></span></q></dt></tr></i><div id='rIrnd'><tfoot id='rIrnd'></tfoot><dl id='rIrnd'><fieldset id='rIrnd'></fieldset></dl></div>

    <bdo id='rIrnd'></bdo><ul id='rIrnd'></ul>

<legend id='rIrnd'><style id='rIrnd'><dir id='rIrnd'><q id='rIrnd'></q></dir></style></legend>

  1. <small id='rIrnd'></small><noframes id='rIrnd'>

    1. <tfoot id='rIrnd'></tfoot>

      Promise allSettled 不是函数

      Promise allSettled is not a function(Promise allSettled 不是函数)

          <i id='l81Zo'><tr id='l81Zo'><dt id='l81Zo'><q id='l81Zo'><span id='l81Zo'><b id='l81Zo'><form id='l81Zo'><ins id='l81Zo'></ins><ul id='l81Zo'></ul><sub id='l81Zo'></sub></form><legend id='l81Zo'></legend><bdo id='l81Zo'><pre id='l81Zo'><center id='l81Zo'></center></pre></bdo></b><th id='l81Zo'></th></span></q></dt></tr></i><div id='l81Zo'><tfoot id='l81Zo'></tfoot><dl id='l81Zo'><fieldset id='l81Zo'></fieldset></dl></div>

          <small id='l81Zo'></small><noframes id='l81Zo'>

            <bdo id='l81Zo'></bdo><ul id='l81Zo'></ul>

            • <tfoot id='l81Zo'></tfoot>
                <tbody id='l81Zo'></tbody>
              1. <legend id='l81Zo'><style id='l81Zo'><dir id='l81Zo'><q id='l81Zo'></q></dir></style></legend>

                本文介绍了Promise allSettled 不是函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我计划在我的 React Native - Expo 项目中将一些 Promise.all 更新为 Promise.allSettled,但该功能不存在.我检查了所有版本,一切都合适,但我仍然无法使用该功能.

                I planned updating some Promise.all to Promise.allSettled in my React Native - Expo Project but the function does not Exist. i checked all Versions and everything fits but i still cant use the function.

                节点-v:14.15.4

                node -v: 14.15.4

                expo SDK -v 版本:^40.0.1

                expo SDK -v version: ^40.0.1

                expo 在其 SDK 版本中使用 react native -v 0.63.这应该不是问题.这是错误信息:

                expo uses react native -v 0.63 in their SDK version. This should not be the problem. This is the error message:

                Promise.allSettled 不是函数

                Promise.allSettled is not a function

                有人知道这个问题的解决方案吗?感谢您的帮助!

                Does anybody knows a solution to this? Thank you for your help!

                推荐答案

                对于遇到此问题的任何人,显然这已在 v64 中修复:

                For anyone coming across this issue, apparently this was fixed in v64:

                https://github.com/facebook/react-native/issues/30236#issuecomment-939286987

                对于旧版本,您可以使用简单的 polyfill:

                For older versions, you can use a simple polyfill:

                Promise.allSettled = Promise.allSettled || ((promises) => Promise.all(
                    promises.map(p => p
                        .then(value => ({
                            status: "fulfilled",
                            value
                        }))
                        .catch(reason => ({
                            status: "rejected",
                            reason
                        }))
                    )
                ));
                

                这篇关于Promise allSettled 不是函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                相关文档推荐

                Gradient Button to background-color blinks on hover(悬停时背景颜色的渐变按钮闪烁)
                How to make hovering over active button not use hover effect?(如何使悬停在活动按钮上不使用悬停效果?)
                html javascript show image hover(html javascript 显示图像悬停)
                How to get css hover values on click?(如何在点击时获得 css 悬停值?)
                Change background image on link hover(更改链接悬停时的背景图像)
                Highlight multiple items on hover#39;s condition(突出显示悬停条件下的多个项目)

                  • <bdo id='H2Xa4'></bdo><ul id='H2Xa4'></ul>

                  • <i id='H2Xa4'><tr id='H2Xa4'><dt id='H2Xa4'><q id='H2Xa4'><span id='H2Xa4'><b id='H2Xa4'><form id='H2Xa4'><ins id='H2Xa4'></ins><ul id='H2Xa4'></ul><sub id='H2Xa4'></sub></form><legend id='H2Xa4'></legend><bdo id='H2Xa4'><pre id='H2Xa4'><center id='H2Xa4'></center></pre></bdo></b><th id='H2Xa4'></th></span></q></dt></tr></i><div id='H2Xa4'><tfoot id='H2Xa4'></tfoot><dl id='H2Xa4'><fieldset id='H2Xa4'></fieldset></dl></div>
                  • <tfoot id='H2Xa4'></tfoot>

                      • <small id='H2Xa4'></small><noframes id='H2Xa4'>

                            <tbody id='H2Xa4'></tbody>
                          <legend id='H2Xa4'><style id='H2Xa4'><dir id='H2Xa4'><q id='H2Xa4'></q></dir></style></legend>