Slide 1

Slide 1 text

RxJSͰۭ࣌Λ੍ͨ͠࿩ M3, Inc. Jun Tomioka

Slide 2

Slide 2 text

ࣗݾ঺հ ෋Ԭ ७ (@jooohn) - ΤϜεϦʔגࣜձࣾ - ΤϯδχΞϦϯάG - ৽نϓϩδΣΫτx2 (ॾࣄ৘ʹΑΓඇެ։த) - ՇͷാͱؒΛͱͬͯڮຊ͔ Β̎h௨ۈʢڠٞதʣ

Slide 3

Slide 3 text

RxJSͰۭ࣌Λ੍ͨ͠࿩

Slide 4

Slide 4 text

ॾࣄ৘ʹΑΓ αʔϏε಺༰Λݴ͑ͳ͍ͷͰ ԾͷαʔϏεͰઆ໌͠·͢

Slide 5

Slide 5 text

https://github.com/jooohn/rx-angular-example

Slide 6

Slide 6 text

ۭ࣌Λ੍͢Δલ https://goo.gl/1wlYCu

Slide 7

Slide 7 text

ۭ࣌Λ੍͍ͤͯͳ͍఺ • Ϣʔβʔ͕ૢ࡞͢Δ౓ɺ΍ͨΒୟ͔ΕΔAPIίʔϧ • λΠϛϯάʹΑۭ͕ͬͯ࣌࿪Ή • Load Moreͷॱ൪ • લճͷݕࡧ݁ՌΫϦΞ • ݹ͍৚݅ͷݕࡧ݁ՌΛදࣔʂʂ

Slide 8

Slide 8 text

ʰjʱͰݕࡧ ʰjaʱͰݕࡧ ʰjaʱͷ݁Ռ ʰjʱͷ݁Ռ ۭ࣌ͷ࿪Έ

Slide 9

Slide 9 text

ۭ࣌ͷ࿪Έ

Slide 10

Slide 10 text

ͭΒ͍

Slide 11

Slide 11 text

ͦ͜Ͱ

Slide 12

Slide 12 text

No content

Slide 13

Slide 13 text

No content

Slide 14

Slide 14 text

An API for asynchronous programming with observable streams ࠓճॏཁͳ఺

Slide 15

Slide 15 text

No content

Slide 16

Slide 16 text

Αͦ͞͏

Slide 17

Slide 17 text

ۭ࣌Λ੍͍ͤͯͳ͍఺ • Ϣʔβʔ͕ૢ࡞͢Δ౓ɺ΍ͨΒୟ͔ΕΔAPIίʔϧ • λΠϛϯάʹΑۭ͕ͬͯ࣌࿪Ή

Slide 18

Slide 18 text

ۭ࣌Λ੍͍ͤͯͳ͍఺ • Ϣʔβʔ͕ૢ࡞͢Δ౓ɺ΍ͨΒୟ͔ΕΔAPIίʔϧ • λΠϛϯάʹΑۭ͕ͬͯ࣌࿪Ή

Slide 19

Slide 19 text

combineLatest

Slide 20

Slide 20 text

ݕࡧΩʔϫʔυͷετϦʔϜ େ཮ͷετϦʔϜ “” “j” “ja” Asia Europe combineLatest “” / Asia “j” / Asia “ja” / Asia “ja” / Europe ݕࡧ৚݅ͷετϦʔϜ

Slide 21

Slide 21 text

ݕࡧ৚݅ͷ ετϦʔϜΛ ҰຊԽ

Slide 22

Slide 22 text

debounce

Slide 23

Slide 23 text

debounce debounce(300) ݕࡧ৚݅ͷετϦʔϜ 300msҎ಺ʹଞͷΠϕϯτ͕͋Δ΋ͷΛഉআ

Slide 24

Slide 24 text

debounce debounce(300) ݕࡧ৚݅ͷετϦʔϜ ࿈ଧɾΩʔλΠϓ౳ͰͷແବͳϦΫΤετΛ࡟ݮʂ

Slide 25

Slide 25 text

ۭ࣌Λ੍͍ͤͯͳ͍఺ • Ϣʔβʔ͕ૢ࡞͢Δ౓ɺ΍ͨΒୟ͔ΕΔAPIίʔϧ • λΠϛϯάʹΑۭ͕ͬͯ࣌࿪Ή

Slide 26

Slide 26 text

ۭ࣌Λ੍͍ͤͯͳ͍఺ • Ϣʔβʔ͕ૢ࡞͢Δ౓ɺ΍ͨΒୟ͔ΕΔAPIίʔϧ • λΠϛϯάʹΑۭ͕ͬͯ࣌࿪Ή

Slide 27

Slide 27 text

flatMapLatest

Slide 28

Slide 28 text

͜Ε͚ͩ

Slide 29

Slide 29 text

flatMap

Slide 30

Slide 30 text

flatMapLatest

Slide 31

Slide 31 text

flatMapLatest ৚݅A ৚݅B ৚݅C ৚݅D flatMapLatest(৚݅ => ݁ՌͷετϦʔϜ) ݁ՌA ݁ՌB ݁ՌC ݁ՌD

Slide 32

Slide 32 text

flatMapLatest ৚݅A ৚݅B ৚݅C ৚݅D flatMapLatest(৚݅ => ݁ՌͷετϦʔϜ) ݁ՌA ݁ՌB ݁ՌC ݁ՌD ۭ͕࣌࿪·ͳ͍

Slide 33

Slide 33 text

ۭ͕࣌࿪·ͳ͍ʂ

Slide 34

Slide 34 text

flatMapLatest

Slide 35

Slide 35 text

͜Ε͚ͩͰ

Slide 36

Slide 36 text

ۭ͕࣌࿪·ͳ͍ʂ

Slide 37

Slide 37 text

ۭ࣌Λ੍͍ͤͯͳ͍఺ • Ϣʔβʔ͕ૢ࡞͢Δ౓ɺ΍ͨΒୟ͔ΕΔAPIίʔϧ • λΠϛϯάʹΑۭ͕ͬͯ࣌࿪Ή

Slide 38

Slide 38 text

https://goo.gl/7phFXe

Slide 39

Slide 39 text

ۭ࣌Λ੍ͨ͠ʂ