Page MenuHomec4science

JournalList.js
No OneTemporary

File Metadata

Created
Sun, Nov 10, 10:49

JournalList.js

import React from 'react';
import API from '../api';
export default class JournalList extends React.Component {
state = {
journals: []
}
componentDidMount() {
this.getJournals();
}
getJournals = async () => {
let res = await API.get(`journal/`);
let { data } = res.data;
this.setState({journals: data});
};
render() {
return (
<ul>
{ this.state.journals.map(journal => <li key={journal.id}>{journal.name} ISSN: {journal.issn.map(item => <p> - {item} </p>)}</li>)}
</ul>
)
}
}

Event Timeline