Aller au contenu principal

Next.js

Framework React pour les projets EFC.

Version

Next.js 14.x avec App Router

Structure projet

src/
├── app/
│ ├── layout.tsx
│ ├── page.tsx
│ └── api/
├── components/
├── lib/
└── prisma/

Configuration

// next.config.js
const nextConfig = {
experimental: {
serverActions: true,
},
};

Server Actions

'use server'

export async function createItem(data: FormData) {
// Action serveur
}

Déploiement

# Via CLI EFC
efc deploy flipfinder --prod