import React, {useState} from "react"; import { BrowserRouter as Router, Switch, Route, Link } from "react-router-dom"; export default function App() { return (
{/* A looks through its children s and renders the first one that matches the current URL. */}
); } function Extensions() { let mapped; let [extensions, setExtensions] = useState([]) if (extensions.length === 0) { mapped =

wait

; fetch("http://127.0.0.1:4567/api/v1/extensions") .then(response => response.json()) .then(data => setExtensions(data)); } else { mapped = extensions.map(it =>

{it.name}

); } return

{mapped}

; } function Home() { return

Home

; } function Users() { return

Users

; }