Answer the question
In order to leave comments, you need to log in
Who knows why undefined?
Hello, undefined falls out, but I can’t understand why. Can someone explain?
Here is the code:
import React from 'react';
import Header from './Header';
import MapCont from './MapCont';
import './style.scss';
export default function Leftside(props) {
console.log(props) // тут приходит объект : {timestamp: 1580223258, message: "success", iss_position: {…}} <- скопировал с консоли
const { iss_position } = props;
console.log(iss_position) // а тут undefined, почему так??
return (
<div className="map-container">
<header>
<Header position={iss_position} />
</header>
<div>
<MapCont />
</div>
</div>
);
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question