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:
- GitHub: https://github.com/livetrails/targetjs
- Website: https://targetjs.io
submitted by /u/Various-Beautiful417
[link] [comments]