wix-incubator / react-templates

Light weight templates for react
https://wix.github.io/react-templates
MIT License
2.82k stars 207 forks source link

allow valid kebab-case tag names #190

Closed nippur72 closed 7 years ago

nippur72 commented 8 years ago

following #106, react-templates currently allows to render non native HTML DOM elements (e.g. WebComponents) if they follow kebab-case naming, but due to a bug, it works only if there is only one hyphen character:

<my-tag></my-tag>         => React.createElement('my-tag', {}); // OK !
<the-my-tag></the-my-tag> => React.createElement(the - my - tag, {}); // wrong !