需要循环:node_modules/rn-fetch-blob/index.js ->node_modules/rn-fetch-blob/polyfill/index.js ->node_modules/rn-fetch-blob/polyfill/XMLHttpRequest.js ->node_modules/rn -fetch-blob/index.js
允许使用循环,但可能会导致未初始化的值。考虑重构以消除对循环的需要。
rn-fetch-blob 库内部
所有这 4 个文件:Blob.js、Fetch.js、FileReader.js、XMLHttpRequest.js
// import RNFetchBlob from '../index.js' --> 注释此行并添加以下行
从'react-native'导入{NativeModules};
const RNFetchBlob = NativeModules.RNFetchBlob