Just to clarify, you'd write the bottom code (declarative) and the library translates it to the above (imperative) code?
https://github.com/levicape/fourtwo
The best way to use template JSX is either with a CLI, or by using #! pragma to output the constructed yaml after using a builder.