Читал про деструктивное присвоение, но там были значения в массиве, а тут в объекте.https://developer.mozilla.org/en-US/docs/Web/JavaS...
Вроде логично, что мы сразу должны получить массив данных, а уже после с ним что-то делать, а тут мы его просто получаем и все.https://medium.com/byte-sized-react/component-arra...
mutations: {
TOGGLE_ITEM: (state, id) => {
const item = state.posts.find((item) => item.id === id);
if (item !== undefined) {
item.checked = !item.checked;
}
},
}, CURLE_URL_MALFORMAT (3)
The URL was not properly formatted.
class Foo
{
public function firstfunc()
{
echo 'hello ';
return $this;
}
public function secondfunc()
{
echo 'world ';
return $this;
}
}
$obj = new Foo();
$obj->firstfunc()->secondfunc();const response = await fetch('localhost:1100/api/motivation/salesData?dt=2021-09-01');
const code1 = await response.json();