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
810
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
340
ソフトウェアエンジニアとしてモナドを完全に理解する / make-perfect-sense-of-monad
jooohn
14
7.8k
ScalaのコンパイラにFizzBuzzを解いてもらう(Dottyもあるよ)
jooohn
1
1k
Write stack safe non-tailrec recursive functions
jooohn
4
950
Introduction to Clean Architecture
jooohn
1
560
人類には早すぎる、謎の計算ロジックに立ち向かう / Strugle with the most complicated logic ever
jooohn
1
1.7k
Work at M3 USA
jooohn
0
1.3k
クラウド電子カルテを支えるテクノロジーの光と闇
jooohn
0
1.3k
怖くないCats
jooohn
0
840
Other Decks in Programming
See All in Programming
TDD 実践ミニトーク
contour_gara
1
260
JSONataを使ってみよう Step Functionsが楽しくなる実践テクニック #devio2025
dafujii
0
210
自作OSでDOOMを動かしてみた
zakki0925224
1
1.4k
サーバーサイドのビルド時間87倍高速化
plaidtech
PRO
0
680
go test -json そして testing.T.Attr / Kyoto.go #63
utgwkk
1
190
250830 IaCの選定~AWS SAMのLambdaをECSに乗り換えたときの備忘録~
east_takumi
0
350
サイトを作ったらNFCタグキーホルダーを爆速で作れ!
yuukis
0
740
ソフトウェアテスト徹底指南書の紹介
goyoki
1
120
【第4回】関東Kaggler会「Kaggleは執筆に役立つ」
mipypf
0
980
Zendeskのチケットを Amazon Bedrockで 解析した
ryokosuge
3
230
Azure SRE Agentで運用は楽になるのか?
kkamegawa
0
850
Namespace and Its Future
tagomoris
6
670
Featured
See All Featured
4 Signs Your Business is Dying
shpigford
184
22k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.4k
Embracing the Ebb and Flow
colly
87
4.8k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
BBQ
matthewcrist
89
9.8k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
358
30k
A Tale of Four Properties
chriscoyier
160
23k
Automating Front-end Workflow
addyosmani
1370
200k
A Modern Web Designer's Workflow
chriscoyier
696
190k
Stop Working from a Prison Cell
hatefulcrawdad
271
21k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
34
3.1k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.5k
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
ۭ࣌Λ੍ͨ͠ʂ