Skip to content

@signaldb/reactively

reactivelyReactivityAdapter (default)

js
import { reactive } from '@reactively/core'
import { Collection } from '@signaldb/core'
import reactivelyReactivityAdapter from '@signaldb/reactively'

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

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

Reactivity adapter for usage with @reactively/core.

The API of Reactively 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.