Hacker News new | ask | show | jobs
by hizanberg 2548 days ago
> a mission to build the most elegant framework ever

The only elegant thing I find about this framework is that it has no deps. A TypeScript-first framework would be a plus but I find the Typed API particularly inelegant with its usage of static methods to compose the UI which is particularly non idiomatic for JavaScript.

There doesn't appear to be any live examples you can experiment with which is a notable shortcoming for a modern JS framework and the only complete stand-alone example I can find is something called "first project" that was contributed 19 days ago:

https://github.com/typescene/first-project/

The name doesn't fill me with confidence and the only example I could find has a webpack dependency which kind of throws out its "no deps" USP. I don't find anything compelling in that example that would entice me to use it over React, Vue or even just Vanilla JS - which I'd prefer to implement this particular example of which I'm not clear what value it adds that would justify adding a dependency to this JS FX.

This file is the most code I could find:

https://github.com/typescene/first-project/blob/master/src/a...

It's full of "magic string" APIs where there's no way you could intuitively guess what the values would be, e.g:

   - maxWidth: "100vw"
   - gravity: "center"
   - revealTransition: "fade"
   - borderColor: "@separator"
The benefit of using TypeScript is that all these values could be typed to assist during development and type-checked to validate any runtime errors.

Magic strings are even being used for callbacks that looks like it uses its own unknown DSL in different APIs of which is going to be unknown to anyone but the author:

    - onEnterKeyPress: "addTask()"
    - state: bind("object.complete")
    - onClick: "+ToggleTask"
    - tl("{@text/50%}${todo.nRemaining} task#{/s} remaining")
    - hidden: bind("!todo.nCompleted")
The docs are particularly lacking in working examples of which the bulk looks like an API class dump which isn't a useful onboarding experience for anyone who wants to learn and use the framework.

Honestly if headline didn't say it took "5 years" to implement I would've guessed its a few months effort max - nothing like the refined, battle-tested, real-world validated framework this article proclaims it to be.