\n\n\n\n\n
Zum Inhalt springen

TargetJS: a UI framework where time is declarative (no async/await chains)

I’ve been building a small JavaScript UI framework called TargetJS and would love feedback from this community. It takes a fundamentally different approach to front-end development, especially when dealing with asynchronous operations and complex UI flows.

The core idea is that it unifies everything—UI, state, APIs, and animations—into a single concept called „targets.“ Instead of using async/await or chaining promises and callbacks, the execution flow is determined by two simple postfixes:

  • $ (Reactive): Runs every time the preceding target updates.
  • $$ (Deferred): Runs only after the preceding targets have fully completed all their operations.

This means you can write a complex sequence of events, like „add button -> animate it -> when done add another element -> animate that -> when done fetch API -> show user data“ and the code reads almost like a step-by-step list, top-to-bottom. The framework handles all the asynchronous „plumbing“ for you.

I think it works really well for applications with a lot of animation or real-time data fetching such as games, interactive dashboards, or rich single-page apps, where managing state and async operations can become a headache.

What do you think of this approach? Have you seen anything similar?

Links:

submitted by /u/Various-Beautiful417
[link] [comments]

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert


Protected by CleanTalk Anti-Spam