Skip to content

Commit

Permalink
Fix watch
Browse files Browse the repository at this point in the history
  • Loading branch information
calebporzio committed Dec 4, 2023
1 parent b7bfd88 commit 1a3a8b7
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions packages/alpinejs/src/magics/$watch.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { magic } from '../magics'
import { effect, release } from '../reactivity'
import { effect, release, watch } from '../reactivity'

magic('watch', (el, { evaluateLater, cleanup }) => (key, callback) => {
let evaluate = evaluateLater(key)
Expand All @@ -12,9 +12,7 @@ magic('watch', (el, { evaluateLater, cleanup }) => (key, callback) => {
return value
}

let unwatch = watch(getter, () => {

})
let unwatch = watch(getter, callback)

cleanup(unwatch)
})
Expand Down

0 comments on commit 1a3a8b7

Please sign in to comment.