Доброе утро! Нужна помощь! Есть массив объектов
import React from 'react';
import JobsList from './JobsList';
const jobs = [
{
id: 1,
name: 'John',
work: 'Taxi'
},
{
id: 2,
name: 'Alex',
work: 'Doctor'
}
];
export default () => <JobsList Jobs={jobs} />;
Вот сам component:
import React, { Component } from 'react';
import Jobs from './JobsListContainer';
class JobsList extends Component {
render(){
const { Jobs } = this.props;
console.log(Jobs);
return(
<div>
{Jobs.map(e => (
<ul key={e.id}>
<li>{e.name}</li>
<li>{e.work}</li>
</ul>
))}
</div>
);
}
}
export default JobsList;
При console.log получаю undefined. В чем моя ошибка
App.jsx
import React, { Component } from 'react';
import JobsList from './components/JobsList';
class App extends Component {
render() {
return (
<div>
<JobsList />
</div>
);
}
}
export default App;