-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom components in different color (enhancement) #173
Comments
@hex13 Yes seems like a good idea for obvious components beginning |
https://facebook.github.io/react/docs/jsx-in-depth.html I'm using this pattern to make Higher Order Components. In examples in docs namespaced components are uppercase though, but they do work lowercase: |
Thanks. Yes I understand the principle but I would still think that a custom component should have an uppercase component name prefix. I appreciate that the compiler will convert tag names with dots to a create element with that tag name as a variable name but it seems at odds with the conventions of jsx. Maybe I'm wrong but the examples above show this uppercase convention. I have no control over the colour of an element. I have modified the grammar to highlight uppercase component names as a class. This will work with most syntax themes as they will highlight classes in a distinct colour. But I'm not sure whether to further modify it to highlight dotted tag names as classes before rolling it out. |
Ok, at least support for upper cased tags would be good :) |
I've just pushed out 2.19.0. It highlights jsx such as |
thanks 👍 |
Would it be possible to highlight custom JSX components (which are starting either with upper-case or have dots in itself like this
<this.props.component />
) in different color that common DOM elements (lower-case)?In other words instead of this:
I would like to see this (changed via dev tools):
Being able to see instantly where custom elements are will make me easier to read and change JSX templates.
The text was updated successfully, but these errors were encountered: