EK
Size: a a a
EK
v
ON
V
ON
v
v
V
R
fetchRecommendations = () => {
this.setState({ recommendations: {} })
const tags = [];
Object.keys(this.state.tags).map(key => (
this.state.tags[key] ? tags.push(key) : null
))
const payload = JSON.stringify({
"columns": ["description"],
"data": tags.join(" ")
});
const request = {
method: "post",
headers: { "Content-Type": "application/json" },
body: payload
}
fetch(`some-url`, request)
.then((response) => response.json())
.then(data => {
console.log(data);
this.setState({ recommendations: data });
})
}
ement type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.но я в упор не понимаю почему так - пример с fetch взял из доки на офсайте
R
IN
О
fetchRecommendations = () => {
this.setState({ recommendations: {} })
const tags = [];
Object.keys(this.state.tags).map(key => (
this.state.tags[key] ? tags.push(key) : null
))
const payload = JSON.stringify({
"columns": ["description"],
"data": tags.join(" ")
});
const request = {
method: "post",
headers: { "Content-Type": "application/json" },
body: payload
}
fetch(`some-url`, request)
.then((response) => response.json())
.then(data => {
console.log(data);
this.setState({ recommendations: data });
})
}
ement type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.но я в упор не понимаю почему так - пример с fetch взял из доки на офсайте
R
О
fetchRecommendations = () => {
this.setState({ recommendations: {} })
const tags = [];
Object.keys(this.state.tags).map(key => (
this.state.tags[key] ? tags.push(key) : null
))
const payload = JSON.stringify({
"columns": ["description"],
"data": tags.join(" ")
});
const request = {
method: "post",
headers: { "Content-Type": "application/json" },
body: payload
}
fetch(`some-url`, request)
.then((response) => response.json())
.then(data => {
console.log(data);
this.setState({ recommendations: data });
})
}
ement type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.но я в упор не понимаю почему так - пример с fetch взял из доки на офсайте
V
V
fetchRecommendations = () => {
this.setState({ recommendations: {} })
const tags = [];
Object.keys(this.state.tags).map(key => (
this.state.tags[key] ? tags.push(key) : null
))
const payload = JSON.stringify({
"columns": ["description"],
"data": tags.join(" ")
});
const request = {
method: "post",
headers: { "Content-Type": "application/json" },
body: payload
}
fetch(`some-url`, request)
.then((response) => response.json())
.then(data => {
console.log(data);
this.setState({ recommendations: data });
})
}
ement type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.но я в упор не понимаю почему так - пример с fetch взял из доки на офсайте
V
AM