If you want a lightweight framework check out UIBuilder instead: https://github.com/wisercoder/uibuilder
Same JSX syntax as React, but this lib is very simple -- just over 200 lines of source code.
If you want a lightweight framework check out UIBuilder instead: https://github.com/wisercoder/uibuilder
Same JSX syntax as React, but this lib is very simple -- just over 200 lines of source code.
And why exactly should this not be checkable at build time? The attributes are defined, their use too, it's as checkable as any JavaScript framework.
If you're using TypeScript, or the like, then you'll naturally get much more things that can be checked, but those are type checks and not syntax checks, i.e., something completely different.
Don't get me wrong, personally I'm all for static typed, and schematic frameworks but that's completely orthogonal to using (custom) HTML attributes, and has nothing to do with syntax checks. I mean, if syntax could not be checked it couldn't be parsed at all...
x-for="post in posts"
You can argue that this is just an HTML attribute, so it is existing syntax. But it appears to be a way of looping through items in a collection, and as such it is neither HTML nor JavaScript, and therefore it is a custom syntax.It is not checkable at build time if there is no checker available.
I frankly see this approach as the Wrong Way at this point. I hate that every new framework comes out with its own take on HTML attributes.
And zero TypeScript support? Seriously?
This is a non-starter framework.
Whenever html attributes start containing logic is when the templating engine has just implemented its own programming language - poorly.
Regretfully we seem to be in the minority, though. I expect more of the HN readership, but apparently the instant gratification culture permeates it here as well.