A
A
Alex102142020-01-28 18:08:32
JavaScript
Alex10214, 2020-01-28 18:08:32

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>
    );
}

Please tell me what's wrong??

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question