Skip to content

Commit

Permalink
feat: add solid reactivity scope checking
Browse files Browse the repository at this point in the history
fixes #938
  • Loading branch information
obedm503 authored and maxnowack committed Sep 18, 2024
1 parent 5292701 commit 1eb253d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/plugin-solid/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { createReactivityAdapter } from 'signaldb'
import { createSignal, onCleanup } from 'solid-js'
import { createSignal, getOwner, onCleanup } from 'solid-js'

const solidReactivityAdapter = createReactivityAdapter({
create: () => {
Expand All @@ -13,7 +13,7 @@ const solidReactivityAdapter = createReactivityAdapter({
},
}
},
isInScope: undefined,
isInScope: () => !!getOwner(),
onDispose: (callback) => {
onCleanup(callback)
},
Expand Down

0 comments on commit 1eb253d

Please sign in to comment.