|
|
|
|
|
by Kuyawa
1 day ago
|
|
I like web components, the simpler the better, so I like what I see but having a strong OCD about syntax I just want to propose the use of <Button ... instead of <elena-button ... It's just a matter of using a regex [1] and making your syntax more palatable Regardless, kudos for the release * const componentRegex = /<%[ ]+([A-Z][a-zA-Z0-9])([^%]?)%>/g; |
|
Your component regex represents a JSX limitation, but web components do not need React. Plus, if you capitalize the first letter, JSX would treat it as a React component rather than a web component (i.e. custom native HTML elements)