{"action":"closed","issue":{"url":"https://api.github.com/repos/bem/bem-react-core/issues/1","repository_url":"https://api.github.com/repos/bem/bem-react-core","labels_url":"https://api.github.com/repos/bem/bem-react-core/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/bem/bem-react-core/issues/1/comments","events_url":"https://api.github.com/repos/bem/bem-react-core/issues/1/events","html_url":"https://github.com/bem/bem-react-core/issues/1","id":157949795,"number":1,"title":"Initial scope","user":{"login":"veged","id":15365,"avatar_url":"https://avatars.githubusercontent.com/u/15365?v=3","gravatar_id":"","url":"https://api.github.com/users/veged","html_url":"https://github.com/veged","followers_url":"https://api.github.com/users/veged/followers","following_url":"https://api.github.com/users/veged/following{/other_user}","gists_url":"https://api.github.com/users/veged/gists{/gist_id}","starred_url":"https://api.github.com/users/veged/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/veged/subscriptions","organizations_url":"https://api.github.com/users/veged/orgs","repos_url":"https://api.github.com/users/veged/repos","events_url":"https://api.github.com/users/veged/events{/privacy}","received_events_url":"https://api.github.com/users/veged/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-06-01T16:22:57Z","updated_at":"2016-08-12T10:31:04Z","closed_at":"2016-08-12T10:31:04Z","body":"- [x] BEM-entities declaration\r\n  - [x] with modifiers\r\n  - [x] on redefinition levels\r\n  - [x] inheritance\r\n- [x] creating\r\n  - [x] with JS classes\r\n  - [x] without JS classes\r\n- [x] html templates\r\n  - [x] tag\r\n  - [x] attrs\r\n  - [x] cls\r\n  - [x] mods\r\n- [x] React lifecycle methods\r\n- [x] mix\r\n- [ ] ~~mixin~~ (TBD)\r\n- [x] jsx\r\n- [x] deps\r\n- [x] ~~build~~ #2\r\n\r\n```js\r\n// MyBlock.js\r\n\r\nimport Bem from 'bem:Bem';\r\nimport MyElem from 'bem:MyBlock-MyElem';\r\nimport OtherBlock from 'bem:OtherBlock';\r\nimport WrapBlock from 'bem:WrapBlock';\r\n\r\nexport default Bem.decl({\r\n    block : 'MyBlock',\r\n    tag : 'a', \r\n    mods({ disabled }) {\r\n        return { disabled };\r\n    },\r\n    // ... etc. about html\r\n    attrs({ disabled, onChange }) {\r\n        return {\r\n            disabled,\r\n            onChange,\r\n            onFocus: this.onFocus,\r\n        }\r\n    },\r\n\r\n    content() { // children?\r\n        return [\r\n            <Bem block={this} elem=\"MyElem\" tag=\"span\"/>,\r\n            <OtherBlock>{ this.props.children }</OtherBlock>,\r\n            <Bem block=\"OtherBlock\" elem=\"OtherElem\" tag=\"span\"/>,\r\n            <MyElem .../>,\r\n            // ...\r\n        ]\r\n    },\r\n\r\n    render() {\r\n        return WrapBlock({}, [this.__base()]);\r\n    },\r\n\r\n    componentWillMount,\r\n    componentDidMount,\r\n    componentWillReceiveProps,\r\n    shouldComponentUpdate,\r\n    // ... all React lifecycle methods\r\n});\r\n\r\n// MyBlock_myMod.js\r\n\r\nimport MyBlock from 'bem:MyBlock'\r\n\r\nexport default MyBlock.decl({\r\n    block : 'MyBlock',\r\n    mod : ({ myMod }) => myMod /* some predicate */, \r\n    tag : 'span',\r\n    // ... any other methods will be guarded by modifier predicate\r\n});\r\n```\r\n"}}
{"actor":{"display_login":"narqo"}}