nuxt-electricsql
v0.0.5
Published
Nuxt module for Electric SQL
Readme
Nuxt Electric SQL
Nuxt module that provides a composable for subscribing to Electric SQL ShapeStreams.
This package will soon be renamed.
Installation
Install the package:
npm i nuxt-electricsqlpnpm i nuxt-electricsqlThen add the module to your nuxt.config.ts:
export default defineNuxtConfig({
// ...
modules: ['nuxt-electricsql']
})Usage
<template>
<div>
<ul>
<li v-for="todo in todos" :key="todo.id">
{{ todo.body }}
</li>
</ul>
</div>
</template>interface Todo {
id: number
body: string
}
const url = 'https://example.com/v1/shape'
const todos = await useShapeStream<Todo>(url, { table: 'todos' })