const newTasks = [...state.tasks]
newTasks.push(newCard);
state.tasks = newTasks // указатель на новый массив
site = await fetch('https://google.com')
ничего не выйдет если ты делаешь запрос, не находясь на странице гугла
675893:1 Access to fetch at 'https://google.com/' from origin 'https://toster.ru' has been blocked by CORS policy:
No 'Access-Control-Allow-Origin' header is present on the requested resource.
If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
Uncaught (in promise) TypeError: Failed to fetch TypeError: Failed to fetch
API call:
api.openweathermap.org/data/2.5/weather?q={city name}
api.openweathermap.org/data/2.5/weather?q={city name},{country code}
Parameters:
q city name and country code divided by comma, use ISO 3166 country codes
Examples of API calls:
api.openweathermap.org/data/2.5/weather?q=London
<aside className={b({ block })}>
state: {
isShow: boolean,
isClan: boolean,
openShow: boolean,
message: string,
} = {
isShow: true,
isClan: false,
openShow: false,
message: "",
};
...
handleHover = () => {
this.setState({ openShow: true });
};
....
<aside
onMouseOver={this.handleHover}
className={b( block: block, className: this.state.openShow ? 'open-show' : '' )}
>
MERN stack = meAn - Angular + React