我目前正在阅读React-Native教程.我从入门教程开始,在那里我做了一个新的反应原生项目并成功设法在我的设备上运行项目.
然后我启动了Props教程,我复制了代码片段并尝试再次运行该项目并在屏幕上显示以下错误消息:

我有一个基于 HTTPS 的网站,我想向 HTTP 端口发出 GET 请求。目前,当我尝试时,我收到以下错误:
cannot load ${url} due to access control checks.
this page was not allowed to display insecure content from ${http-url}
Run Code Online (Sandbox Code Playgroud)
我考虑过将请求放入 AWS lambda 函数并调用 labmda 函数,因为这会给我一个 HTTPS URL?这可能吗。
即便如此,我想知道最简单的方法是什么,因为我对 AWS 不太了解,所以我必须学习它。
const url = 'http://website/fmi/xml/fmresultset.xml?-dbnames';
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function (params) {
console.log(xhttp.status);
if (xhttp.readyState ==4) {
if (xhttp.status == 200) {
console.log('====');
console.log(xhttp.responseText);
}
}
}
xhttp.open("GET", url, true);
xhttp.send();
Run Code Online (Sandbox Code Playgroud) 我需要经历多个数组并创建一个新数组,其中包含来自多个数组的所有值,没有重复,是否有任何插件/快速方法可以执行此操作?
var x = {
"12": [3, 4],
"13": [3],
"14": [1, 4]
};
Run Code Online (Sandbox Code Playgroud)
结果应如下所示:
[1,3,4];
Run Code Online (Sandbox Code Playgroud) 这是我的代码
<RadioButtons
type="test"
field="test"
optionInclude={['1', '2', '3']}
optionOrder={['1', '2', '3']}
updateValue={[
{ key: '1', value: 'test' },
{ key: '2', value: 'test2' },
{ key: '3', value: 'Other' }
]}
icons={[
<Icon variant="male" size={35} />,
<Icon variant="female" size={35} />,
<Icon variant="plus" size={35} />
]}
/>Run Code Online (Sandbox Code Playgroud)
运行 EsLint 时出现此错误:
70:33 error Missing "key" prop for element in array react/jsx-key
71:33 error Missing "key" prop for element in array react/jsx-key
72:33 error Missing "key" prop for element in array
第 70 - …
javascript ×4
reactjs ×2
arrays ×1
aws-lambda ×1
eslint ×1
facebook ×1
http ×1
https ×1
react-native ×1
typescript ×1