Closed vheathen closed 2 months ago
I don't think it's a good idea. It might save a few chars but hurts readability. For example @=@socket
seems very confusing.
Another reason is that @ has a special meaning in HEEX. That's the reason why I opted to use only v-
prefix for special props (socket, ssr, and handlers).
Last - My personal preference is if a single thing can be done in a single way 😉
Do you agree?
It would be very helpful to have short version of the properties like
v-socket
andv-component
.For example:
v-component="Counter"
->@Counter
v-socket={@socket}
->@={@socket}
v-on:event="handler"
->@on:event="handler
I made a small change to make it work, and for me these renders 4 Counter components:
I can send PR if need.