{"action":"created","issue":{"url":"https://api.github.com/repos/ractivejs/ractive/issues/2314","labels_url":"https://api.github.com/repos/ractivejs/ractive/issues/2314/labels{/name}","comments_url":"https://api.github.com/repos/ractivejs/ractive/issues/2314/comments","events_url":"https://api.github.com/repos/ractivejs/ractive/issues/2314/events","html_url":"https://github.com/ractivejs/ractive/issues/2314","id":120983164,"number":2314,"title":"Ractive 0.8 Two-Way binding failing.","user":{"login":"ISNIT0","id":5173131,"avatar_url":"https://avatars.githubusercontent.com/u/5173131?v=3","gravatar_id":"","url":"https://api.github.com/users/ISNIT0","html_url":"https://github.com/ISNIT0","followers_url":"https://api.github.com/users/ISNIT0/followers","following_url":"https://api.github.com/users/ISNIT0/following{/other_user}","gists_url":"https://api.github.com/users/ISNIT0/gists{/gist_id}","starred_url":"https://api.github.com/users/ISNIT0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ISNIT0/subscriptions","organizations_url":"https://api.github.com/users/ISNIT0/orgs","repos_url":"https://api.github.com/users/ISNIT0/repos","events_url":"https://api.github.com/users/ISNIT0/events{/privacy}","received_events_url":"https://api.github.com/users/ISNIT0/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ractivejs/ractive/labels/question","name":"question","color":"cc317c"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-12-08T10:55:18Z","updated_at":"2015-12-28T12:45:50Z","closed_at":"2015-12-23T00:37:31Z","body":"A few times now, I have tried updating a project to Ractive 0.8 as an experiment, but I keep ketting two-way binding errors which I never got previously.\r\n\r\nIs there a breaking change I'm missing or would it be worth my investigating?\r\n\r\n![image](https://cloud.githubusercontent.com/assets/5173131/11653962/ed76f03c-9d99-11e5-8c27-93e3f5e00522.png)\r\n"},"comment":{"url":"https://api.github.com/repos/ractivejs/ractive/issues/comments/167563220","html_url":"https://github.com/ractivejs/ractive/issues/2314#issuecomment-167563220","issue_url":"https://api.github.com/repos/ractivejs/ractive/issues/2314","id":167563220,"user":{"login":"guilhermeaiolfi","id":254360,"avatar_url":"https://avatars.githubusercontent.com/u/254360?v=3","gravatar_id":"","url":"https://api.github.com/users/guilhermeaiolfi","html_url":"https://github.com/guilhermeaiolfi","followers_url":"https://api.github.com/users/guilhermeaiolfi/followers","following_url":"https://api.github.com/users/guilhermeaiolfi/following{/other_user}","gists_url":"https://api.github.com/users/guilhermeaiolfi/gists{/gist_id}","starred_url":"https://api.github.com/users/guilhermeaiolfi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guilhermeaiolfi/subscriptions","organizations_url":"https://api.github.com/users/guilhermeaiolfi/orgs","repos_url":"https://api.github.com/users/guilhermeaiolfi/repos","events_url":"https://api.github.com/users/guilhermeaiolfi/events{/privacy}","received_events_url":"https://api.github.com/users/guilhermeaiolfi/received_events","type":"User","site_admin":false},"created_at":"2015-12-28T12:45:49Z","updated_at":"2015-12-28T12:45:49Z","body":"I went after how vue does it: http://vuejs.org/guide/components.html#Prop_Binding_Types :\r\n```html\r\n<!-- default, one-way-down binding -->\r\n<child :msg=\"parentMsg\"></child>\r\n\r\n<!-- explicit two-way binding -->\r\n<child :msg.sync=\"parentMsg\"></child>\r\n\r\n<!-- explicit one-time binding -->\r\n<child :msg.once=\"parentMsg\"></child>\r\n```\r\n\r\nYou can still set validation and settings for your properties like so:\r\n\r\n```javascript\r\nVue.component('example', {\r\n  props: {\r\n    // basic type check (`null` means accept any type)\r\n    propA: Number,\r\n    // a required string\r\n    propB: {\r\n      type: String,\r\n      required: true\r\n    },\r\n    // a number with default value\r\n    propC: {\r\n      type: Number,\r\n      default: 100\r\n    },\r\n    // object/array defaults should be returned from a\r\n    // factory function\r\n    propD: {\r\n      type: Object,\r\n      default: function () {\r\n        return { msg: 'hello' }\r\n      }\r\n    },\r\n    // indicate this prop expects a two-way binding. will\r\n    // raise a warning if binding type does not match.\r\n    propE: {\r\n      twoWay: true\r\n    },\r\n    // custom validator function\r\n    propF: {\r\n      validator: function (value) {\r\n        return value > 10\r\n      }\r\n    },\r\n    // coerce function (new in 1.0.12)\r\n    // cast the value before setting it on the component\r\n    propG: {\r\n      coerce: function (val) {\r\n        return val + '' // cast the value to string\r\n      }\r\n    }\r\n  }\r\n})\r\n```\r\nSee ```propE``` definition. That would be a nice addition. What do you think?"}}