Add remix-like loaders and actions to your Nuxt page components.
[!WARNING]
This project is experimental. The APIs are subject to change without notice. Proceed with caution.
<script lang="ts">
import { prisma } from '@/lib/prisma.server'
export async function loader() {
const products = await prisma.product.findMany()
return products
}
</script>
<script setup lang="ts">
const { data } = await useLoaderData<typeof loader>()
</script>
<template>
<div>
<h1>Products</h1>
<div v-for="product in data" :key="product.id">
{{ product.name }}
</div>
</div>
</template>
For documentation about Numix please visit https://numix.vercel.app.
cp playground/.env.example playground/.env
pnpm dev:prepare
to generate type stubs.pnpm db:prepare
to generate fake data.pnpm dev
to start playground in development mode.MIT