elie222

page-structure

Page structure

elie222 12.785 1.626 Actualitzat fa 8 mesos
GitHub

Instal·la

npx skillscat add elie222/inbox-zero/page-structure

Instal·la des del registre de SkillsCat.

SKILL.md

Page Structure

  • Create new pages at: apps/web/app/(app)/PAGE_NAME/page.tsx
  • Components for the page are either put in page.tsx, or in the apps/web/app/(app)/PAGE_NAME folder
  • Pages are Server components so you can load data into them directly
  • If we're in a deeply nested component we will use swr to fetch via API
  • If you need to use onClick in a component, that component is a client component and file must start with use client