til

derek·2024년 10월 10일
0
  1. data.posts.length >0 ? mapping : loading
  2. Promise.all([fetch().then(), ...].then(([posts,users])=>setData({posts,users}))

ssg : fetch with no option, {cache:force-cache}
isr: {next: {revalidate : (num)}}, export const revalidate = (num)
ssr: {cache: no-store}, export const dynamic = (num)
csr: "use-client" -- to use [onClick, hooks(useEffect, useState)]

error.jsx must b client components
Parent layout.jsx error handling mustb global-error.js (reset versus refresh)
if wanna use remote Image tag (reset nextconfig)

-data caching per fetch function
full route cache(build)
data cache(per request)

supabase
1. new project (copy database password) - korea
2. table editor - create new
3. RLS (on)
4. import data via spreadsheet
5. id - check primary + isIdentity
6. null value -> empty, 0, true
7. add RLS POLICY
8. create policy
9. update policy ( user.id == uuid() )

yarn add @supabase/ssr @supabase/supabase-js
.env NEXT-PUBLIC-SUPABASE_URL/ANON_KEY
Set [client, server, middleware].supabase

profile
derek

0개의 댓글