Additional method of defining boolean HTML attributes #1202
Unanswered
stephendolan
asked this question in
General
Replies: 1 comment
-
To avoid breaking changes, I could totally see a world where I have both signatures available, and without diving into the code I couldn't say for sure, but maybe we could even simply call the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Lucky's current
attrs
helper takes in anArray(Symbol)
.This is super convenient for stuff like always setting a button to
disabled
on page load, but is trickier with dynamic attributes based on page data.What are the group's thoughts on another implementation that can take in a
Hash(Symbol, Boolean)
?For example, it would allow me to turn this:
Into this:
This isn't an original idea, and basically came from me trying to write attributes out the same way that Vue does.
Beta Was this translation helpful? Give feedback.
All reactions