We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 40aa4c9 commit bc16e06Copy full SHA for bc16e06
src/index.js
@@ -42,7 +42,7 @@ function bindDocument ({
42
// TODO warning check if key exists?
43
const boundRefs = Object.create(null)
44
45
- const unbind = document.onSnapshot((doc) => {
+ return document.onSnapshot(doc => {
46
// TODO test doc.exist
47
// console.log('doc data', doc)
48
const [data, refs] = extractRefs(createSnapshot(doc))
@@ -60,10 +60,7 @@ function bindDocument ({
60
console.log('onSnapshot ERR' ,err)
61
})
62
63
- return () => {
64
- // TODO unbind all from boundRefs
65
- return unbind()
66
- }
+ // TODO return a custom unbind function that unbind all refs
67
}
68
69
function bind ({ vm, key, ref }) {
0 commit comments