Can't display data after fetch
问题 I'm trying to get a data from an REST endpoint through axios and then render them in my app.js component and after that provide them to the whole app by using context API: axios.js import axios from 'axios'; const instance = axios.create({ baseURL: 'api_endpoint' }); export default instance; app.js import Context from './context' class App extends Component { constructor(props) { super(props) this.state = { comp: [] } }; async componentDidMount() { await instance.get('') .then(res => { const