Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fallenmax/stream
Another FRP library (WIP)
https://github.com/fallenmax/stream
Last synced: 11 days ago
JSON representation
Another FRP library (WIP)
- Host: GitHub
- URL: https://github.com/fallenmax/stream
- Owner: FallenMax
- License: apache-2.0
- Created: 2021-08-29T14:08:40.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-08-29T15:07:29.000Z (over 3 years ago)
- Last Synced: 2024-11-20T19:33:46.063Z (2 months ago)
- Language: TypeScript
- Size: 47.9 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Another FRP library (WIP)
_Quoted from [StreetStrider/fluh](https://github.com/StreetStrider/fluh):_
> When thinking of reactive stuff there're multiple spaces of decisions in which you have to make a choice.
>
> - Is it push or pull?
> - Is it unicast or multicast?
> - Is it always live or depends on subscribers' presense?
> - Does stream have value at any time?
> - Is it sync or async?
> - How errors should be handled?
> - Does stream end?
> - Is data graph static or dynamic?
>
> Choosing some decisions will lead to a specific FRP system.
> Watch [this speech](https://www.youtube.com/watch?v=Agu6jipKfYw) about this decision space.This library is:
- A push-strategy FRP implementation
- Stream only become _active_ when there are subscribers, and stops when there are none
- Streams are shared/multicast by default, and contains single (current) value
- "no update" is expressed with special value `NOTHING` during update, so `null` or `undefined` can be freely used, you can also detect or return `NOTHING` when building your stream
- Data graph is static by default
- Update is atomic like [flyd](https://github.com/paldepind/flyd#atomic-updates), avoiding intermediate states
- Sync by defaultThere are still some unfinished parts, namely:
- Figure out how to handle update-during-another-update
- Figure out how to handle subscribe/unsubscribe-during-update
- More essential operators
- Benchmark and performance optimizations