Replies: 1 comment 2 replies
-
Hi @vilim. Here's how I'd start out (full sandbox)
I tend to avoid using arrays as values since streams already act as an iterable source. If you want a stream as an array you can always do a |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello! I am slowly figuring my way around this wonderful set of libraries, but it's still tricky to put things together as I am quite new to javascript/typescript.
I need to do a rather basic thing: have a
stream()
containing an array append a value from the current value of another stream on an event (a button click). Should I be usingrstream
together withatom
? I came up with the following, but I haven't seen this pattern (with .deref()) used in any of the examples, which usually use transducers (however I couldn't find an instance where the stream is derived from its previous value). Or is this approach fine as-is?Beta Was this translation helpful? Give feedback.
All reactions