import React from 'react'; import logo from './logo.svg'; import './App.css'; export default class App extends React.Component { constructor(props) { super(props); this.state = { festivals: null , fetched:false, }; } fetchFestivals=()=>{ fetch('http://localhost/drupalmod2/festivals?_format=json', { method: 'get', headers: {'Content-Type': 'application/json'} }).then(response=>response.json()).then(data=>{if(data)this.setState({fetched:true,festivals:data})}) } componentDidMount=()=>{ this.fetchFestivals(); } render(){ console.log(this.state.festivals) return (