Skip to content

Commit 4d66865

Browse files
committed
RxJS for Krakow workshops
1 parent 39983df commit 4d66865

File tree

5 files changed

+209
-78
lines changed

5 files changed

+209
-78
lines changed

SUMMARY.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,10 @@
6565
* [\#3: Implementing actions in app](ngrx/ACTIONS_IN_APP.md)
6666
* [\#4: Selectors](ngrx/SELECTORS.md)
6767

68+
* [RxJS](rxjs/RXJS_INTRO.md)
69+
* [Operators](rxjs/OPERATORS.md)
70+
* [Play time!](rxjs/PLAYGROUND.md)
71+
6872
* [Blog Editor ](workshops/blog-editor/index.md)
6973
* [\#1 ⚙️Configuring firebase](workshops/blog-editor/01_firebase.md)
7074
* [\#2 💅Add Angular Material](workshops/blog-editor/02_add_material.md)
@@ -75,4 +79,4 @@
7579
* [\#6 💅Add Feed](workshops/blog-editor/07_add_feed.md)
7680
* [\#7 ✏️Edit Post](workshops/blog-editor/08_edit_post.md)
7781
* [\#9 🚀Deploy](workshops/blog-editor/09_deploy.md)
78-
* [\#10 ✏ ️Next Steps](workshops/blog-editor/10_next_steps.md)
82+
* [\#10 ✏ ️Next Steps](workshops/blog-editor/10_next_steps.md)

examples/5_01-store-setup/package-lock.json

+42-77
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rxjs/OPERATORS.md

+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# Examples of Operators
2+
3+
Here we will walk you through some basic operators. Each one will have link to [RxMarbles: Interactive diagrams of Rx Observables](https://rxmarbles.com/) example and from [RxJS and Reactive Programming - Animations and visual lessons](https://reactive.how/)
4+
5+
## map
6+
7+
`map` is an operator which is mapping emitted values to ones we want - it takes value, passes it through given function and returns new Observable.
8+
9+
> [Map on RxMarbles](https://rxmarbles.com/#map)
10+
>
11+
> [Map on reactive.how](https://reactive.how/map)
12+
13+
You may think of `map` as of a mist which each boat makes a blue boat - it is mapping boat :speedboat: to blue boat.
14+
15+
## filter
16+
17+
`filter` is an operator which emits only those values which satisfy a specified predicate.
18+
19+
> [filter on RxMarbles](https://rxmarbles.com/#filter)
20+
>
21+
> [Map vs Filter on reactive.how](https://reactive.how/filter)
22+
23+
This operator may be one that will allow only yellow boats to pass the bridge, or only those who has at least 3 people on board.
24+
25+
## merge
26+
27+
`merge` flattens multiple Observables together by returning mix of their values into one Observable.
28+
29+
> [merge on RxMarbles](https://rxmarbles.com/#merge)
30+
>
31+
> [merge on reactive.how](https://reactive.how/merge)
32+
33+
`merge` may be understood as a place where two rivers join and make one new river. Boats from both of them will flow on the new river with the order they've entered the river crossing.
34+
35+
## combineLatest
36+
37+
`combineLatest` multiple Observables to create an Observable whose values are calculated from the latest values of each of its input Observables.
38+
39+
> [combineLatest on RxMarbles](https://rxmarbles.com/#combineLatest)
40+
>
41+
> [combineLatest on reactive.how](https://reactive.how/combinelatest)
42+
43+
You may think of `combineLatest` as of gallery showing a pair of boats (from different rivers), always the latest ones that entered joined river.
44+
45+
## takeLast
46+
47+
`takeLast` emits last x values emitted by the source Observable. Which means that if you will call `takeLast(3)` it will emit last 3 values emitted by Observable. It will do so **after** Observable reaching completed state.
48+
49+
> [takeLast on RxMarbles](https://rxmarbles.com/#takeLast)
50+
>
51+
> [takeLast on reactive.how](https://reactive.how/takelast)
52+
53+
## take
54+
55+
`take` emits first x values emitted by the source Observable. Which means that if you will call `take(3)` it will emit first 3 values emitted by Observable. After that it will complete returned Observable.
56+
57+
> [take on RxMarbles](https://rxmarbles.com/#take)
58+
>
59+
> [take on reactive.how](https://reactive.how/take)

0 commit comments

Comments
 (0)