I came across this interesting looking library:
https://stken2050.github.io/unlimitedjs/
It appears to be a simpler alternative to React and hooks - and the author makes it look very appealing in terms of being very simple and generic. It looks like this concept composes well, using plain JS that doesn't require any magic or a linter.
The documentation uses a lot of science jargon though - and the links to articles that explain the concepts are even worse, and the library code has been pretty heavily code-golfed.
I'm not a computer scientist, so...
What's special about a timeline monad?
How does it differ from a plain old pub/sub event-bus?
What's the advantage over pub/sub in the context of UI?
Does this somehow help with "unpredictable" events, like, say, chat messages?
Explain like I'm five please? 🙂
I can't really answer your questions, but I took a quick look at timeline-monad ( stken2050.github.io/timeline-monad/ ).
The idea seems to be very similar to js promises; except js promises can only be resolved or rejected once, whereas this code supports a sequence of events flowing from a single timeline. It would be like having a promise where the
then
function is called potentially multiple times. That seems to be its chief purpose as compared with promises.I'm not sure what happens when there are multiple processing steps and each processing step is asynchronous though. As new events keep triggering the
sync
functions, do they queue up in the subsequent steps to make sure order is preserved? My gut feeling is that this approach is problematic.