Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
RxJSで時空を制した話
Search
Jun Tomioka
July 14, 2016
Programming
3
790
RxJSで時空を制した話
RxJSで時空を制した話@M3techmeetup
http://m3-engineer.connpass.com/event/33802/
Jun Tomioka
July 14, 2016
Tweet
Share
More Decks by Jun Tomioka
See All by Jun Tomioka
Dotty で軽量な DI ライブラリをかいてみた
jooohn
1
280
ソフトウェアエンジニアとしてモナドを完全に理解する / make-perfect-sense-of-monad
jooohn
14
7.5k
ScalaのコンパイラにFizzBuzzを解いてもらう(Dottyもあるよ)
jooohn
1
940
Write stack safe non-tailrec recursive functions
jooohn
4
860
Introduction to Clean Architecture
jooohn
1
530
人類には早すぎる、謎の計算ロジックに立ち向かう / Strugle with the most complicated logic ever
jooohn
1
1.6k
Work at M3 USA
jooohn
0
1.2k
クラウド電子カルテを支えるテクノロジーの光と闇
jooohn
0
1.2k
怖くないCats
jooohn
0
730
Other Decks in Programming
See All in Programming
flutterkaigi_2024.pdf
kyoheig3
0
150
アジャイルを支えるテストアーキテクチャ設計/Test Architecting for Agile
goyoki
9
3.3k
距離関数を極める! / SESSIONS 2024
gam0022
0
290
Arm移行タイムアタック
qnighy
0
330
Less waste, more joy, and a lot more green: How Quarkus makes Java better
hollycummins
0
100
ActiveSupport::Notifications supporting instrumentation of Rails apps with OpenTelemetry
ymtdzzz
1
250
シェーダーで魅せるMapLibreの動的ラスタータイル
satoshi7190
1
480
ヤプリ新卒SREの オンボーディング
masaki12
0
130
OnlineTestConf: Test Automation Friend or Foe
maaretp
0
110
PHP でアセンブリ言語のように書く技術
memory1994
PRO
1
170
聞き手から登壇者へ: RubyKaigi2024 LTでの初挑戦が 教えてくれた、可能性の星
mikik0
1
130
Jakarta EE meets AI
ivargrimstad
0
670
Featured
See All Featured
GraphQLの誤解/rethinking-graphql
sonatard
67
10k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
126
18k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.3k
How to Think Like a Performance Engineer
csswizardry
20
1.1k
Building Your Own Lightsaber
phodgson
103
6.1k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
Fireside Chat
paigeccino
34
3k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5k
A Philosophy of Restraint
colly
203
16k
Navigating Team Friction
lara
183
14k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
Site-Speed That Sticks
csswizardry
0
28
Transcript
RxJSͰۭ࣌Λ੍ͨ͠ M3, Inc. Jun Tomioka
ࣗݾհ Ԭ ७ (@jooohn) - ΤϜεϦʔגࣜձࣾ - ΤϯδχΞϦϯάG - ৽نϓϩδΣΫτx2
(ॾࣄʹΑΓඇެ։த) - ՇͷാͱؒΛͱͬͯڮຊ͔ Β̎h௨ۈʢڠٞதʣ
RxJSͰۭ࣌Λ੍ͨ͠
ॾࣄʹΑΓ αʔϏε༰Λݴ͑ͳ͍ͷͰ ԾͷαʔϏεͰઆ໌͠·͢
https://github.com/jooohn/rx-angular-example
ۭ࣌Λ੍͢Δલ https://goo.gl/1wlYCu
ۭ࣌Λ੍͍ͤͯͳ͍ • Ϣʔβʔ͕ૢ࡞͢ΔɺͨΒୟ͔ΕΔAPIίʔϧ • λΠϛϯάʹΑۭ͕ͬͯ࣌Ή • Load Moreͷॱ൪ • લճͷݕࡧ݁ՌΫϦΞ
• ݹ͍݅ͷݕࡧ݁ՌΛදࣔʂʂ
ʰjʱͰݕࡧ ʰjaʱͰݕࡧ ʰjaʱͷ݁Ռ ʰjʱͷ݁Ռ ۭ࣌ͷΈ
ۭ࣌ͷΈ
ͭΒ͍
ͦ͜Ͱ
None
None
An API for asynchronous programming with observable streams ࠓճॏཁͳ
None
Αͦ͞͏
ۭ࣌Λ੍͍ͤͯͳ͍ • Ϣʔβʔ͕ૢ࡞͢ΔɺͨΒୟ͔ΕΔAPIίʔϧ • λΠϛϯάʹΑۭ͕ͬͯ࣌Ή
ۭ࣌Λ੍͍ͤͯͳ͍ • Ϣʔβʔ͕ૢ࡞͢ΔɺͨΒୟ͔ΕΔAPIίʔϧ • λΠϛϯάʹΑۭ͕ͬͯ࣌Ή
combineLatest
ݕࡧΩʔϫʔυͷετϦʔϜ େͷετϦʔϜ “” “j” “ja” Asia Europe combineLatest “” /
Asia “j” / Asia “ja” / Asia “ja” / Europe ݕࡧ݅ͷετϦʔϜ
ݕࡧ݅ͷ ετϦʔϜΛ ҰຊԽ
debounce
debounce debounce(300) ݕࡧ݅ͷετϦʔϜ 300msҎʹଞͷΠϕϯτ͕͋ΔͷΛഉআ
debounce debounce(300) ݕࡧ݅ͷετϦʔϜ ࿈ଧɾΩʔλΠϓͰͷແବͳϦΫΤετΛݮʂ
ۭ࣌Λ੍͍ͤͯͳ͍ • Ϣʔβʔ͕ૢ࡞͢ΔɺͨΒୟ͔ΕΔAPIίʔϧ • λΠϛϯάʹΑۭ͕ͬͯ࣌Ή
ۭ࣌Λ੍͍ͤͯͳ͍ • Ϣʔβʔ͕ૢ࡞͢ΔɺͨΒୟ͔ΕΔAPIίʔϧ • λΠϛϯάʹΑۭ͕ͬͯ࣌Ή
flatMapLatest
͜Ε͚ͩ
flatMap
flatMapLatest
flatMapLatest ݅A ݅B ݅C ݅D flatMapLatest(݅ => ݁ՌͷετϦʔϜ) ݁ՌA ݁ՌB
݁ՌC ݁ՌD
flatMapLatest ݅A ݅B ݅C ݅D flatMapLatest(݅ => ݁ՌͷετϦʔϜ) ݁ՌA ݁ՌB
݁ՌC ݁ՌD ۭ͕࣌·ͳ͍
ۭ͕࣌·ͳ͍ʂ
flatMapLatest
͜Ε͚ͩͰ
ۭ͕࣌·ͳ͍ʂ
ۭ࣌Λ੍͍ͤͯͳ͍ • Ϣʔβʔ͕ૢ࡞͢ΔɺͨΒୟ͔ΕΔAPIίʔϧ • λΠϛϯάʹΑۭ͕ͬͯ࣌Ή
https://goo.gl/7phFXe
ۭ࣌Λ੍ͨ͠ʂ