Shorthand for properties with same name as variable

It’d be nice if the *.ux syntax supported a shortcut whereby if I have a property with the same name as a variable, I can just write the property name. For example, if I have the declaration

<Router ux:Name="router" />

and then a declaration

<HomePage ux:Template="home" router="router" />

an equivalent declaration could be

<HomePage ux:Template="home" router />

similar to ES6 with variable names that are the same as key names: const foo = 1; const o = { foo };.

Thanks for the suggestion! UX markup is XML (and not JavaScript), and while I haven’t read the spec recently, I don’t think something like that is expected to be supported.

Well, any chance of supporting a syntax that’s a little less verbose, like YML?

Hi Matthew,

Many thanks for your suggestion.

We are constantly working on reducing verbosity and generally the amount of code you have to write to make apps in Fuse. Less code is one of our core values.

While your specific suggestion is constructive, I can reveal that we are about to roll out a brand new JavaScript developer story for Fuse (FuseJS) that will make passing dependencies around in UX (in particular router) obsolete, and you will write a lot less code in general to do advanced navigation.

(If you want in on the beta testing action for this, reach out to one of the Fuse crew on our community slack)

Just a little info I happen to know from teaching XML to HTMLers:

@Matthew T Adams was talking about “attribute minimization”.

XML does NOT permit “attribute minimization”, but some specific ML’s can.

XML Applications: Fuse UX ML (no, at least not currently), HTML (yes), SGML (yes https://www.w3.org/TR/WD-object-970218 , xHTML (no) https://www.w3.org/TR/xhtml1/diffs.html#h-4.5 ).

Hope you find this helpful, or at least informative.

DhB