@signaldb/solid
solidReactivityAdapter (default)
import { Collection, DefaultDataAdapter } from '@signaldb/core'
import solidReactivityAdapter from '@signaldb/solid'
import { createEffect } from 'solid-js'
const posts = new Collection('posts', new DefaultDataAdapter(), {
reactivity: solidReactivityAdapter,
})
createEffect(() => {
console.log(posts.find({ author: 'John' }).count())
})Reactivity adapter for usage with solid.js.
The adapter supports automatic cleanup through Solid's onCleanup and reactive scope checking through Solid's getOwner(): a query made outside a reactive owner (an effect, memo, component or root) is not made reactive, so you don't have to pass { reactive: false } there yourself.
Solid-js's integration with SignalDB leverages the power of Solid's reactive primitives to seamlessly connect with SignalDB's reactive local JavaScript database. Solid-js, known for its granular reactivity and efficient data management, provides a robust foundation for SignalDB to build upon. When using Solid-js, developers can effortlessly create and manage signals, which are core reactive primitives. These signals can then be integrated with SignalDB, allowing for real-time data updates and synchronization. This synergy between Solid-js and SignalDB ensures that developers can harness the full potential of both technologies, resulting in a more dynamic and responsive application. By utilizing Solid-js's automatic dependency tracking and SignalDB's MongoDB-like interface, developers can achieve a seamless flow of data, enhancing the overall user experience. In essence, the integration of Solid-js with SignalDB represents the convergence of two powerful technologies, offering developers a streamlined approach to building reactive applications.