Created
August 19, 2020 21:45
-
-
Save indreklasn/872f6b1a1fa2fd78073c6ce6396e558b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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