import React from 'react'; import { useEffect, useState } from 'react'; import './App.css'; function App() { const [date, setDate] = useState(null); useEffect(() => { async function getDate() { const res = await fetch('/api/date'); const newDate = await res.text(); setDate(newDate); } getDate(); }, []); return (

Create React App + Go API

Deployed with{' '} Vercel !

This project {' '} was bootstrapped with{' '} Create React App {' '} and contains three directories, /public for static assets,{' '} /src for components and content, and /api{' '} which contains a serverless Go{' '} function. See{' '} api/date for the Date API with Go .


The date according to Go is:

{date ? date : 'Loading date...'}

); } export default App;