-
Notifications
You must be signed in to change notification settings - Fork 0
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
removing the ":" prefix on component names #1
Comments
I'm of fan of TOOWTDI (There's only one way to do it). If you can do this - Thus, as a LISP fan myself, the first word in the "brackets" is always the element, and there's no confusion anytime. |
@giltayar - I'm also a fan of this design philosophy, unfortunately this can't work when there is no way to enforce the one true way... I'll update the FAQ, and add a prefix config option: // done once per app:
const H = ReactHut.createHut(React, {prefix : ""});
// then:
H("div",
["span.my-span", 42]) thanks for the input :) |
wll be evaluated to the same thing as this (in JSX):
but we actually want this:
:(
Tags like "b", "article", "header", etc are common words.. nested array children are
not that common, but can happen when calling map:
By adding a prefix ":" be can almost avoid this edge case:
and it also allows me to add syntax highlighting to the first string that starts with ":" in an array.
I also considered 3 alternatives:
option 1 sucks because sooner or later someone will call .filter..
and I don't have a way to protect against it, the rules of the system are correct,
it's the data that is "bad"..
option 2 can be easily implemented on top of this library.
option 3 is what I implemented initially and didn't like it at all, too much ]]]]]]]]] (I'm a LISP fan, I like my brackets round :P ).
any other ideas are welcome :)
@giltayar ?
The text was updated successfully, but these errors were encountered: