wobsoriano / numix

Write your server code inside Vue SFC's and handle forms easily.
https://numix.vercel.app
216 stars 1 forks source link
nuxt vue

Numix

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>

Documentation

For documentation about Numix please visit https://numix.vercel.app.

Development

License

MIT