Skip to content

Instantly share code, notes, and snippets.

@indreklasn
Created August 19, 2020 21:45
Show Gist options
  • Save indreklasn/872f6b1a1fa2fd78073c6ce6396e558b to your computer and use it in GitHub Desktop.
Save indreklasn/872f6b1a1fa2fd78073c6ce6396e558b to your computer and use it in GitHub Desktop.
import React, { useEffect, useState, Fragment } from "react";
import Tabletop from "tabletop";
export default function App() {
const [data, setData] = useState([]);
useEffect(() => {
Tabletop.init({
key: "1TK1Qj6kfA90KbmFAdnIOtKUttpJUhZoZuOPy925c6nQ",
simpleSheet: true
})
.then((data) => setData(data))
.catch((err) => console.warn(err));
}, []);
return (
<>
<h1>data from google sheets</h1>
// render data here
</>
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment