create-deep
v1.0.0
Published
Mimics SolidJS's `createSignal()` and `createMemo()` but with deep equality checks
Downloads
10
Maintainers
Readme
create-deep
Mimics SolidJS's
createSignal()
andcreateMemo()
but with deep equality checks.
Install
npm install create-deep
API
dequal
is used for the deep equality checks.
createDeepSignal<T>(value?: T)
function Component() {
const [value, setValue] = createDeepSignal([1, 2, 3])
}
createDeepMemo<T>(() => T)
function Component() {
const value = createDeepMemo(() => {
return items().filter(item => item.size > 0)
})
}