inesita-rb / inesita

Frontend web application framework in Ruby using Opal.
https://inesita.fazibear.me/
MIT License
259 stars 15 forks source link

allow to render passing an array argument instead of a block #21

Closed elia closed 7 years ago

elia commented 8 years ago

Would be better both for performance and to simplify the syntax:

eg.

em { "foobar" }

vs.

em "foobar"
# or
em nil, "foobar"
# or
em {}, ["foobar"]
# etc.

I know it's not straightforward to implement, but would be useful to have

fazibear commented 8 years ago

This is related to opal-virtual-dom. Yes this will be very useful, lot of times I just forgot to use a block in this case.

fazibear commented 7 years ago

Hey, opal-virtual-dom 0.4.3 support this syntax:

em "ffoobar"

old way is still supported:

em { "foobar" }
elia commented 7 years ago

Great news thanks!