Open garaven opened 14 hours ago
import { createClient } from "@supabase/supabase-js"; const supabase = createClient("https://<project>.supabase.co", "<your-anon-key>"); function App() { const [countries, setCountries] = useState([]); useEffect(() => { getCountries(); }, []); async function getCountries() { const { data } = await supabase.from("countries").select(); setCountries(data); } return ( <ul> {countries.map((country) => ( <li key={country.name}>{country.name}</li> ))} </ul> ); } export default App;
But, do you need to configure Supabase on my own first or something like that?
Example