medikoo / domjs

DOM template engine for client and server

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rethink idea of automatic template resolution

medikoo opened this issue · comments

/cc @kamsi @mtuchowski

At this point DOM generated within templates is auto-magically gathered by domjs internals via collect method.

It was made that way to allow to write templates without need of return [...] wraps. Still this methods introduces side-effects when we work with non typical domjs element generators e.g. as _if or etc. (ones introduced by domjs-ext). They require wrapping their result with insert function, and that can be confusing to unwary developers, and leads to hard to debug issues if omitted.

We should either resign from that magic or find a solution so it works without need of using insert in any cases.