Skip to content

@signaldb/sinuous

sinuousReactivityAdapter (default)

js
import { api } from 'sinuous'
import sinuousReactivityAdapter from '@signaldb/sinuous'
import { Collection } from '@signaldb/core'

const posts = new Collection({
  reactivity: sinuousReactivityAdapter,
})

api.subscribe(() => {
  console.log(posts.find({ author: 'John' }).count())
})

Reactivity adapter for usage with sinuous.

The API of Sinuous doesn't allow reactive scope checking. You must manually disable reactivity when making calls outside a reactive scope to avoid memory leaks. You can do this by passing { reactive: false } to your options (e.g. <collection>.find({ ... }, { reactive: false })).

Released under the MIT License.