Skip to content

[Module Listing Request]: Nuxt Realtime #1510

Description

@daanvangeloven

Description

This module adds realtime state sync via WebSockets.

The main feature is the useRealtimeState composable which can be used like a normal useState with automatic syncing across all clients.

Here is a simple example of how it works:

<script setup>
// Works just like useState but synced across all clients
const poll = useRealtimeState('poll', {
  question: 'Tabs or spaces?',
  tabs: 0,
  spaces: 0,
})

// Every connected client sees this instantly
poll.value.tabs++
</script>

It's built on Socket.IO with channel-based subscriptions under the hood, so users don't have to deal with any of the wiring or complexities of websockets.

Repository

https://github.com/daanvangeloven/nuxt-realtime

npm

https://www.npmjs.com/package/nuxt-realtime

Nuxt Compatibility

Nuxt 3

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions