@krulod/wire v1.0.20
EXPERIMENTAL
@krulod/wire
✨
Wire is a reactive programming library for JavaScript.
Ideas
If you are a front-end developer, most likely you are familiar with MobX. It is a well-known library for describing how the data is stored and computed in a reactive manner. Many developers love MobX for its simplicity - you just define data models, computed states, execution flows, and the library cares for the rest.
Wire aims to be the new MobX. Easier, faster, more powerful.
Stable
We are convinced that reactive runtime must be rock solid. Wire handles dozens of edge cases and ensures that the same work is never done twice.
Efficient
Reactivity is expensive. Reduction of overhead and memory footrpint is our passion, so Wire is suitable for hot cases.
Wire currently participates in these benchmarks and shows itself pretty well:
- Big State Managers Benchmark: complex benchmark that measures how efficiently a reactive library skips redundant calculations
reactive-computed-bench
: simple, synthetic benchmark that measures the overhead of reactivity in a static dependency graph
Do you know any other reactive libraries benchmarks? Reach @krulod in Telegram!
Light bundles
Wire core distribution adds less than 4kb to your application size, which is ~4 times less than MobX and ~2.5 times less than Effector.
Synchronous flows
Working with asynchrony is complicated. Luckily, this is where Wire shines the brightest.
To make the code as simple and consistent as possible, avoid function coloring and help the JIT compiler with its optimizations... we ditch asynchronous functions and generator-based flows in favor of continuations, also known as algebraic effects.
Right now, we are not going to dive into this part of Wire any further since the documentation reveals the magic behind it, but once you get the idea, continuations became a powerful and predictable tool to work with.
Learn
NOT WRITTEN YET
Installation
pnpm add @krulod/wire
pnpm add @krulod/wire-react # React integration
Acknowledgements
Project state
Wire is in active development. While it's mostly finished and completely usable, it lacks documentation.
Besides
License
GNU Affero General Public License v3.0 or later
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago