{"action":"opened","issue":{"url":"https://api.github.com/repos/vuejs/vuefire/issues/208","repository_url":"https://api.github.com/repos/vuejs/vuefire","labels_url":"https://api.github.com/repos/vuejs/vuefire/issues/208/labels{/name}","comments_url":"https://api.github.com/repos/vuejs/vuefire/issues/208/comments","events_url":"https://api.github.com/repos/vuejs/vuefire/issues/208/events","html_url":"https://github.com/vuejs/vuefire/issues/208","id":356475043,"node_id":"MDU6SXNzdWUzNTY0NzUwNDM=","number":208,"title":"[feature request] automatic rebind","user":{"login":"wujekbogdan","id":533954,"node_id":"MDQ6VXNlcjUzMzk1NA==","avatar_url":"https://avatars1.githubusercontent.com/u/533954?v=4","gravatar_id":"","url":"https://api.github.com/users/wujekbogdan","html_url":"https://github.com/wujekbogdan","followers_url":"https://api.github.com/users/wujekbogdan/followers","following_url":"https://api.github.com/users/wujekbogdan/following{/other_user}","gists_url":"https://api.github.com/users/wujekbogdan/gists{/gist_id}","starred_url":"https://api.github.com/users/wujekbogdan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wujekbogdan/subscriptions","organizations_url":"https://api.github.com/users/wujekbogdan/orgs","repos_url":"https://api.github.com/users/wujekbogdan/repos","events_url":"https://api.github.com/users/wujekbogdan/events{/privacy}","received_events_url":"https://api.github.com/users/wujekbogdan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-09-03T11:52:30Z","updated_at":"2018-09-03T11:52:30Z","closed_at":null,"author_association":"NONE","body":"Currently, if we want to implement automatic rebind we have to use a watcher, unbind and then rebind firebase refs using `$bindAsArray` or `$bindAsObject` methods.\r\n\r\nIf such a feature was implemented then re-binding refs after instance properites change would be as easy as:\r\n\r\n``` javascript\r\nconst vm = new Vue({\r\n  el: '#my-el',\r\n  firebase(vm) {\r\n    const key = vm.key;\r\n    return {\r\n      anArray: db.ref(`url/to/my/collection/${key}`)\r\n    }\r\n  },\r\n  data: () => ({\r\n    key: 'some-value',\r\n  }),\r\n})\r\n```\r\n\r\nIs it possible to implement such a feature?"}}
{"actor":{"display_login":"wujekbogdan"}}