import React, { Component } from "react"; import { BrowserRouter as Router, Route, Link } from "react-router-dom"; const axios = require('axios'); class Playlists extends Component { constructor(props){ super(props); this.state = { isLoading: true } this.getPlaylists(); } getPlaylists(){ var self = this; axios.get('/api/playlists') .then((response) => { self.setState({ playlists: response.data.playlists, isLoading: false }); }); } render() { const table =