react-native - Expo反应本机日志不会出现在控制台上
问题描述
尝试记录获取 json 响应时遇到问题。日志似乎没有记录,昨晚一切都很好。今天早上突然发现数据猫被记录了
const fetchResults = async (text, offset = data.length, options = {}) => {
const { timeout = 8000 } = options;
const controller = new AbortController();
const requestUrl = `https://itunes.apple.com/search?limit=30&offset=${offset}&term=${text}`;
console.log(requestUrl);
const res = fetch(requestUrl)
.then((res) => {
console.log(res)
return res.json()
})
.then((res) => {
// The log below doesnt appear on console
console.log(res);
})
.catch((err) => {
console.error('Request failed', err);
});
};
解决方案
我找到了,限制太高(30)当我更改为 10 时它又开始显示,可能日志无法打印大数据
推荐阅读
- python - 如何在 Python 中使用 zeep 格式化来自 WSDL 的 xml 请求
- selenium - 无法在范围报告中查看屏幕截图
- encryption - 嵌入式固件的代码签名:当固件被加密时,CRC 是否足够?
- java - ESC/POS 命令解释
- react-native - FlatList 不动态呈现样式
- c# - C# UWP UploadOperation BackgroundUploader 找不到响应
- python - 将 scipy.stats.ttest_ind 用于整个数组与两个向量时的不同结果
- powerbi - 将周/年转换为日期功率 bi
- javascript - 如何绕过 Angular 使用自己的猴子补丁来撤消我的猴子补丁?
- node.js - Azure Active Directory 没有正确注销用户?