{"action":"created","issue":{"url":"https://api.github.com/repos/marko-js/marko-widgets/issues/52","labels_url":"https://api.github.com/repos/marko-js/marko-widgets/issues/52/labels{/name}","comments_url":"https://api.github.com/repos/marko-js/marko-widgets/issues/52/comments","events_url":"https://api.github.com/repos/marko-js/marko-widgets/issues/52/events","html_url":"https://github.com/marko-js/marko-widgets/issues/52","id":93356750,"number":52,"title":"Improved documentation for stateful/complex widgets","user":{"login":"kristianmandrup","id":125005,"avatar_url":"https://avatars.githubusercontent.com/u/125005?v=3","gravatar_id":"","url":"https://api.github.com/users/kristianmandrup","html_url":"https://github.com/kristianmandrup","followers_url":"https://api.github.com/users/kristianmandrup/followers","following_url":"https://api.github.com/users/kristianmandrup/following{/other_user}","gists_url":"https://api.github.com/users/kristianmandrup/gists{/gist_id}","starred_url":"https://api.github.com/users/kristianmandrup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kristianmandrup/subscriptions","organizations_url":"https://api.github.com/users/kristianmandrup/orgs","repos_url":"https://api.github.com/users/kristianmandrup/repos","events_url":"https://api.github.com/users/kristianmandrup/events{/privacy}","received_events_url":"https://api.github.com/users/kristianmandrup/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/marko-js/marko-widgets/labels/documentation","name":"documentation","color":"0052cc"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-07-06T19:22:07Z","updated_at":"2015-08-12T21:00:45Z","closed_at":null,"body":"Reading through the docs on stateful widget... the following was unclear to me:\r\n\r\n```js\r\n    isSelected: function() {\r\n        return this.state.selected;\r\n    }\r\n```\r\n\r\nWhere is this used? explicitly or implicitly somehow?\r\nAnd this:\r\n\r\n```js\r\n    getInitialState: function(input) {\r\n        return {\r\n            name: input.name,\r\n            selected: input.selected || false;\r\n        }\r\n    },\r\n```\r\n\r\nI assume for selected to be true, I would have to set the selected attribute on the widget?\r\n\r\n`<my-widget selected=\"true\"/>`\r\n\r\nLater...\r\n\r\n`w-id=\"overlay\"` - widget ID ?\r\n\r\n` this.getWidget('overlay').show();`\r\n\r\nWould be nice with a little more guidance/explanation :) Thanks!"},"comment":{"url":"https://api.github.com/repos/marko-js/marko-widgets/issues/comments/130447715","html_url":"https://github.com/marko-js/marko-widgets/issues/52#issuecomment-130447715","issue_url":"https://api.github.com/repos/marko-js/marko-widgets/issues/52","id":130447715,"user":{"login":"kristianmandrup","id":125005,"avatar_url":"https://avatars.githubusercontent.com/u/125005?v=3","gravatar_id":"","url":"https://api.github.com/users/kristianmandrup","html_url":"https://github.com/kristianmandrup","followers_url":"https://api.github.com/users/kristianmandrup/followers","following_url":"https://api.github.com/users/kristianmandrup/following{/other_user}","gists_url":"https://api.github.com/users/kristianmandrup/gists{/gist_id}","starred_url":"https://api.github.com/users/kristianmandrup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kristianmandrup/subscriptions","organizations_url":"https://api.github.com/users/kristianmandrup/orgs","repos_url":"https://api.github.com/users/kristianmandrup/repos","events_url":"https://api.github.com/users/kristianmandrup/events{/privacy}","received_events_url":"https://api.github.com/users/kristianmandrup/received_events","type":"User","site_admin":false},"created_at":"2015-08-12T21:00:45Z","updated_at":"2015-08-12T21:00:45Z","body":"`<div w-bind>` works just as well as `<div w-bind=\"true\">` right? You can close issue after this ;)\r\nThanks again :)"}}