Created
March 14, 2016 19:13
-
-
Save iofjuupasli/64c0d4f448a6ee5d8bd6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// All children from new line | |
// bad | |
h('.my-class', null, h('span', null, 'Foo')); | |
// good | |
h('.my-class', null, | |
h('span', null, | |
'Foo' | |
) | |
); | |
// Don't use div as component name - it's default | |
// bad | |
h('div.foo', null, | |
h('div') | |
); | |
// good | |
h('.foo', null, | |
h('.bar') | |
); | |
// Use only static component names (for DOM elements) | |
// bad | |
h(`span.${componentClassName}`); | |
// good | |
h('span', { | |
className: componentClassName | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment