|
|
|
|
|
by tjallingt
3575 days ago
|
|
I've never seen this before: children(el => [
el.email = input(props({ type: 'email' })),
el.pass = input(props({ type: 'pass' })),
el.submit = button(text('Sign in'))
])
Can someone explains what this does and why it is used here?
As i understand it this function both modifies the `el` object (whatever that is) and returns an array containing the input elements, but why would you want to do both those things at the same time? |
|
As for the other example:
This is rather simpler, frankly. I prefer plain DOM for myself at this level.