DEV Community


Discussion on: State Management with a Single Line of Code

jonrandy profile image
Jon Randy

One line... plus 1.64MB to import the library, and likely add dependencies on top of that. Ludicrous

dabalyan profile image
Ankit Singh Author

only 8kB gzipped, and it's tree-shakeable too, that's what would go to production, not all the 1.64MBs of documentation, typings, and unpacked code.

aisone profile image
Aaron Gong

Thank you for the good effort.

Yes it is 8KB gzip, will also need to add 11kb for rxjs (but this is ok for those who have use case for rxjs).

The next step is to make the library have as little dependencies as possible. One that does not have breaking changes or at least are easily manageable.

Thread Thread
dabalyan profile image
Ankit Singh Author

my pleasure :)

not quite correct, those 8kBs include all the RxJS dependencies that ActiveJS has, and 8kBs are for projects that are going to use ActiveJS without a module bundler, the target use case of ActiveJS is going to be modern Web-Apps built with modern frameworks, all of them have a module bundler like webpack, to eliminate any unused/dead-code from the bundle, see

Dependency on RxJS is a feature not a bug ;)
Since the ActiveJS Units extend RxJS' Observable class, it gives you the possibility to use all the myriads of RxJS operators.

darlantc profile image
Darlan Tódero ten Caten

Why so angry man? You just read the title and get straight here to comment without taking the time to analyze the work of the author?