{"action":"created","issue":{"url":"https://api.github.com/repos/lhorie/mithril.js/issues/530","labels_url":"https://api.github.com/repos/lhorie/mithril.js/issues/530/labels{/name}","comments_url":"https://api.github.com/repos/lhorie/mithril.js/issues/530/comments","events_url":"https://api.github.com/repos/lhorie/mithril.js/issues/530/events","html_url":"https://github.com/lhorie/mithril.js/issues/530","id":66178286,"number":530,"title":"m.component Semantics Proposal","user":{"login":"mindeavor","id":17013,"avatar_url":"https://avatars.githubusercontent.com/u/17013?v=3","gravatar_id":"","url":"https://api.github.com/users/mindeavor","html_url":"https://github.com/mindeavor","followers_url":"https://api.github.com/users/mindeavor/followers","following_url":"https://api.github.com/users/mindeavor/following{/other_user}","gists_url":"https://api.github.com/users/mindeavor/gists{/gist_id}","starred_url":"https://api.github.com/users/mindeavor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mindeavor/subscriptions","organizations_url":"https://api.github.com/users/mindeavor/orgs","repos_url":"https://api.github.com/users/mindeavor/repos","events_url":"https://api.github.com/users/mindeavor/events{/privacy}","received_events_url":"https://api.github.com/users/mindeavor/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":15,"created_at":"2015-04-03T16:19:19Z","updated_at":"2015-04-06T21:25:33Z","closed_at":null,"body":"Based on our discussion in #497, I've created a [wiki page](https://github.com/lhorie/mithril.js/wiki/Components-Syntax-Proposal) describing proposed changes to the semantics of what `m.component` would be. Please discuss and we can update the wiki if we find flaws / better solutions."},"comment":{"url":"https://api.github.com/repos/lhorie/mithril.js/issues/comments/90250258","html_url":"https://github.com/lhorie/mithril.js/issues/530#issuecomment-90250258","issue_url":"https://api.github.com/repos/lhorie/mithril.js/issues/530","id":90250258,"user":{"login":"lhorie","id":1637573,"avatar_url":"https://avatars.githubusercontent.com/u/1637573?v=3","gravatar_id":"","url":"https://api.github.com/users/lhorie","html_url":"https://github.com/lhorie","followers_url":"https://api.github.com/users/lhorie/followers","following_url":"https://api.github.com/users/lhorie/following{/other_user}","gists_url":"https://api.github.com/users/lhorie/gists{/gist_id}","starred_url":"https://api.github.com/users/lhorie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lhorie/subscriptions","organizations_url":"https://api.github.com/users/lhorie/orgs","repos_url":"https://api.github.com/users/lhorie/repos","events_url":"https://api.github.com/users/lhorie/events{/privacy}","received_events_url":"https://api.github.com/users/lhorie/received_events","type":"User","site_admin":false},"created_at":"2015-04-06T21:25:33Z","updated_at":"2015-04-06T21:25:33Z","body":"@mindeavor anything that looks like `{controller, view}` is considered a component (actually, simply having a view is enough, since controller is optional), so, no, a component doesn't necessarily need to be created via `m.component`. Technically, you only need to use `m.component` to be able to parameterize a component, but in the docs, I'm making all component declarations call `m.component` for consistency (to avoid confusion).\r\n\r\nWRT to the limitation of a root element needing to be an element: There is one caveat to that caveat that is currently wrong in the documentation: a component may be the root element of another component. However, adding a `tag` property to a component object won't create an implicit tag (and I don't think allowing \"hiding\" of a tag like this would be a good idea)"}}