You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think this looks much cleaner and symmetric. Users would only fallback to prop when needing some exotic properties.
"Most common properties" are things like prop.text, prop.children, prop.onClick (button), prop.onChange (input), prop.valueOrDefault (input), prop.key, prop.src (image) etc.
What do you think about this?
The text was updated successfully, but these errors were encountered:
Hmmmmm I am not sure about this, frankly. The biggest benefit of this small library is that it's nothing more than just extension to Feliz. I tend to build on Feliz instead of overloading / shadowing its functionality. The message here is: Hey, here you have some Feliz divs, inputs, buttons with pre-selected className, but for everything else use the original syntax. Whatever you add into future versions (if not breaking change) of Feliz, it should be available immediatelly and used with existing extensions. I actually have that in README as advantage of this library, that most of the time you remaing with known existing Feliz syntax.
I agree it would look way more concise to have button.onClick instead of prop.onClick but thinking if this should be concern of extension.
It is not really a big deal to be honest. From a user point of view I am following a vague guideline called "Don't make me think" 😄 and in this case I was trying to minimize the number of places the user has to look for properties if he or she already started looking under the button module. Even Fulma does a little bit of this where it adds Button.OnClick and Input.OnChange so I thought it might be nice here too.
Generate prop aliases for specific elements such that there is no need to fallback to
prop
for "most commonly used" properties:Before
After
I think this looks much cleaner and symmetric. Users would only fallback to
prop
when needing some exotic properties."Most common properties" are things like
prop.text
,prop.children
,prop.onClick
(button),prop.onChange
(input),prop.valueOrDefault
(input),prop.key
,prop.src
(image) etc.What do you think about this?
The text was updated successfully, but these errors were encountered: