Closed icylace closed 10 years ago
It would be this:
A({ id: "google", class: "external", href: "http://google.com"}, "Google");
There should be no performance issues, as using a string, (as in your example), would mean mithril is parsing it first. I'd say this is more readable, and (most likely) better performance, win/win!
What do you reckon?
Okay, makes sense !
Is there a sugar tag equivalent for elements that have static attributes? For example:
As I understand it, when using the
m
function, using a JavaScript object to set attributes is meant for dynamic attributes.