Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
DX(Developer Experience) x React x SPA 気持ちよく開発を...
Search
Nakagawa Koh
October 16, 2019
Technology
45
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
DX(Developer Experience) x React x SPA 気持ちよく開発をするためのフロントエンド開発環境
Nakagawa Koh
October 16, 2019
Other Decks in Technology
See All in Technology
Rust で関数型ドメインモデリング
takonda
0
170
フィンテック養成勉強会#68
finengine
0
140
PagerDuty Tech Hub-鳴らすけれど、人は動かない
ezaki
0
180
Running Kotlin + Quarkus with Lambda
nealle
1
4k
LambdaWebFunctionsを試してみた / exploring-lambda-web-functions
koukihosaka
1
360
トークン化預金DCJPYの取り組みと活用ユースケース
finengine
0
160
大型犬好きによるPugの紹介
yamanoku
1
160
脆弱性診断って、何をしているの? 〜弱点を見つけて、会社の改善につなげるまで〜
keeg
0
930
コンテナ運用におけるネットワーク・コンテナコストの削減方法/How to Reduce Network and Container Costs in Container Operations
masakiokuda
2
300
Refining Active Record
shugo
0
160
AI × アーキテクト 第1・2章|生成AIの課題とアーキテクトの素養
daidaidai
0
180
オントロジーって 結局なにもの? AI エージェントに「意味」を渡す知識設計の話
greenmidori
0
230
Featured
See All Featured
So, you think you're a good person
axbom
PRO
2
2.2k
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
460
AI: The stuff that nobody shows you
jnunemaker
PRO
10
1.2k
brightonSEO & MeasureFest 2025 - Winning Strategies for Black Friday CRO & PPC - Christian Goodrich
cargoodrich
3
870
A Tale of Four Properties
chriscoyier
163
24k
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
120
120k
Abbi's Birthday
coloredviolet
4
10k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.7k
Paper Plane
katiecoart
PRO
5
54k
It's Worth the Effort
3n
188
29k
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.8k
Rails Girls Zürich Keynote
gr2m
96
14k
Transcript
DX(Developer Experience) x React x SPA ؾ࣋ͪΑ͘։ൃΛ͢ΔͨΊͷϑϩϯτΤϯυ։ൃڥ Koh Nakagawa
None
อݥཧళ͚ͷސ٬ཧγεςϜΛ SPAͰ։ൃ͍ͯ͠·͢
Copyright ©2019 hokan, Inc. All rights reserved. େ·͔ͳϓϩμΫτհ 4 -ސ٬ཧ
-Ұཡ, ৄࡉ, ސ٬Ϛʔδ, ސ٬෮ݩ -ܖཧ -Ұཡ, ৄࡉ, ܖΠϯϙʔτ -Todoཧ -εέδϡʔϧཧ -ҙѲཧ -ઃఆ, ࣮ࢪ, ཧ -ΞϓϦέʔγϣϯઃఆ -άϧʔϓཧ, ϝϯόʔཧ, Ϛελཧ -…etc
ΞϓϦέʔγϣϯن͕ େ͖͘ͳΔʹͭΕͯ
૿͑ͯ͘ΔComponent atomicσβΠϯΛ࠾༻͍͕ͯͨ͠ ࠶ར༻͞Ε͍ͯͨΓɺ͠ͳ͔ͬͨΓ͢ΔOrganismୡ
ґଘؔͺͬͱΈ͔Βͣɺຖ֬ೝ… ։ൃͷؾ࣋ͪྑ͞ ↘↘︎
৳ͼ͖ͯͨBuild࣌ؒ - Production Build: 4 - Development Build: 3
γϯϓϧʹਏ͍… ։ൃͷؾ࣋ͪྑ͞ ↘↘︎
ͳΜͱ͔͠Α͏
~ ࠓ͢͜ͱ ~ - σΟϨΫτϦߏ͔ΒґଘؔΛ໌֬ʹ - webpackͷύϑΥʔϚϯενϡʔχϯά - ͓·͚ -
DLLόϯυϧͰ༻සͷߴ͍ϥΠϒϥϦΛϏϧυର֎ʹ - redux-dynamic-modulesͰɺactionsɺreducermoduleʹแ - aliasΛ࡞͠ɺimport࣌ͷύεࠈΛεοΩϦ
~ ࠓ͢͜ͱ ~ - σΟϨΫτϦߏ͔ΒґଘؔΛ໌֬ʹ - webpackͷύϑΥʔϚϯενϡʔχϯά - ͓·͚ -
DLLόϯυϧͰ༻සͷߴ͍ϥΠϒϥϦΛϏϧυର֎ʹ - redux-dynamic-modulesͰɺactionsɺreducermoduleʹแ - aliasΛ࡞͠ɺimport࣌ͷύεࠈΛεοΩϦ
Copyright ©2019 hokan, Inc. All rights reserved. σΟϨΫτϦߏͷݟ͠ 13
Copyright ©2019 hokan, Inc. All rights reserved. σΟϨΫτϦߏͷݟ͠ 14
Copyright ©2019 hokan, Inc. All rights reserved. σΟϨΫτϦߏͷݟ͠ 15 ྫ͑ɺ͜ͷComponent
Copyright ©2019 hokan, Inc. All rights reserved. σΟϨΫτϦߏͷݟ͠ 16 ྫ͑ɺ͜ͷComponent
͜ͷComponentͰ͔͠༻͞Ε͍ͯͳ͍
Copyright ©2019 hokan, Inc. All rights reserved. σΟϨΫτϦߏͷݟ͠ 17 ྫ͑ɺ͜ͷComponent
͜ͷComponentͰ͔͠༻͞Ε͍ͯͳ͍ ͜ͷComponentͰ͔͠༻͞Ε͍ͯͳ͍
Copyright ©2019 hokan, Inc. All rights reserved. σΟϨΫτϦߏͷݟ͠ 18 ྫ͑ɺ͜ͷComponent
͜ͷComponentͰ͔͠༻͞Ε͍ͯͳ͍ ސ٬ҰཡϖʔδͰ͔͠༻͍ͯ͠ͳ͍ ͜ͷComponentͰ͔͠༻͞Ε͍ͯͳ͍
Copyright ©2019 hokan, Inc. All rights reserved. σΟϨΫτϦߏͷݟ͠ 19 ࠶ར༻͞Ε͍ͯͳ͍
Copyright ©2019 hokan, Inc. All rights reserved. σΟϨΫτϦߏͷݟ͠ 20 -
࠶ར༻ੑͷߴ͍atomsɺmoleculesɺorganisms…etc packagesσΟϨΫτϦԼͷcomponentsʹ·ͱΊͯɺ ଞϓϩδΣΫτͰ͍ճͤΔΑ͏ʹ͢Δ - ΞϓϦέʔγϣϯґଘ͕ڧ͘࠶ར༻͕͍͠ͷ ֤ػೳϞδϡʔϧʹஔ͢Δ - ࠶ར༻͞ΕΔͷɺ͞Εͳ͍ComponentΛ໌֬ʹ͚ ͯɺӨڹൣғͷେ͖͕͞ஔ͞Ε͍ͯΔσΟϨΫτϦ͔ ΒஅͰ͖ΔΑ͏ʹ͢Δ
Copyright ©2019 hokan, Inc. All rights reserved. σΟϨΫτϦߏͷݟ͠ 21 -
࠶ར༻ੑͷߴ͍atomsɺmoleculesɺorganisms…etc packagesσΟϨΫτϦԼͷcomponentsʹ·ͱΊͯɺ ଞϓϩδΣΫτͰ͍ճͤΔΑ͏ʹ͢Δ - ΞϓϦέʔγϣϯґଘ͕ڧ͘࠶ར༻͕͍͠ͷ ֤ػೳϞδϡʔϧʹஔ͢Δ - ࠶ར༻͞ΕΔͷɺ͞Εͳ͍ComponentΛ໌֬ʹ͚ ͯɺӨڹൣғͷେ͖͕͞ஔ͞Ε͍ͯΔσΟϨΫτϦ͔ ΒஅͰ͖ΔΑ͏ʹ͢Δ
Copyright ©2019 hokan, Inc. All rights reserved. σΟϨΫτϦߏͷݟ͠ 22 -
࠶ར༻ੑͷߴ͍atomsɺmoleculesɺorganisms…etc packagesσΟϨΫτϦԼͷcomponentsʹ·ͱΊͯɺ ଞϓϩδΣΫτͰ͍ճͤΔΑ͏ʹ͢Δ - ΞϓϦέʔγϣϯґଘ͕ڧ͘࠶ར༻͕͍͠ͷ ֤ػೳϞδϡʔϧʹஔ͢Δ - ࠶ར༻͞ΕΔͷɺ͞Εͳ͍ComponentΛ໌֬ʹ͚ ͯɺӨڹൣғͷେ͖͕͞ஔ͞Ε͍ͯΔσΟϨΫτϦ͔ ΒஅͰ͖ΔΑ͏ʹ͢Δ
Copyright ©2019 hokan, Inc. All rights reserved. σΟϨΫτϦߏͷݟ͠ 23 -
࠶ར༻ੑͷߴ͍atomsɺmoleculesɺorganisms…etc packagesσΟϨΫτϦԼͷcomponentsʹ·ͱΊͯɺ ଞϓϩδΣΫτͰ͍ճͤΔΑ͏ʹ͢Δ - ΞϓϦέʔγϣϯґଘ͕ڧ͘࠶ར༻͕͍͠ͷ ֤ػೳϞδϡʔϧʹஔ͢Δ - ࠶ར༻͞ΕΔͷɺ͞Εͳ͍ComponentΛ໌֬ʹ͚ ͯɺӨڹൣғͷେ͖͕͞ஔ͞Ε͍ͯΔσΟϨΫτϦ͔ ΒஅͰ͖ΔΑ͏ʹ͢Δ
Copyright ©2019 hokan, Inc. All rights reserved. σΟϨΫτϦߏͷݟ͠ 24 -
࠶ར༻ੑͷߴ͍atomsɺmoleculesɺorganisms…etc packagesσΟϨΫτϦԼͷcomponentsʹ·ͱΊͯɺ ଞϓϩδΣΫτͰ͍ճͤΔΑ͏ʹ͢Δ - ΞϓϦέʔγϣϯґଘ͕ڧ͘࠶ར༻͕͍͠ͷ ֤ػೳϞδϡʔϧʹஔ͢Δ - ࠶ར༻͞ΕΔͷɺ͞Εͳ͍ComponentΛ໌֬ʹ͚ ͯɺӨڹൣғͷେ͖͕͞ஔ͞Ε͍ͯΔσΟϨΫτϦ͔ ΒஅͰ͖ΔΑ͏ʹ͢Δ ސ٬ҰཡϖʔδͰ͔͠༻͍ͯ͠ͳ͍ Componentͨͪ͜͜
~ ࠓ͢͜ͱ ~ - σΟϨΫτϦߏ͔ΒґଘؔΛ໌֬ʹ - webpackͷύϑΥʔϚϯενϡʔχϯά - ͓·͚ -
DLLόϯυϧͰ༻සͷߴ͍ϥΠϒϥϦΛϏϧυର֎ʹ - redux-dynamic-modulesͰɺactionsɺreducermoduleʹแ - aliasΛ࡞͠ɺimport࣌ͷύεࠈΛεοΩϦ
Copyright ©2019 hokan, Inc. All rights reserved. webpackͷύϑΥʔϚϯενϡʔχϯά 26 1ճ
2ճ 3ճ Production Build 4:51.91 2:31.80 2:28.97 Development Build 3:02.79 1:28.87 1:38.34 Before
Copyright ©2019 hokan, Inc. All rights reserved. webpackͷύϑΥʔϚϯενϡʔχϯά 27 1ճ
2ճ 3ճ Production Build 4:51.91 2:31.80 2:28.97 Development Build 3:02.79 1:28.87 1:38.34 Before Chunkଟ͘ͳΔͱɺ ϏϧυύϑΥʔϚϯε͓ͪΔΑ
Copyright ©2019 hokan, Inc. All rights reserved. webpackͷύϑΥʔϚϯενϡʔχϯά 28 1ճ
2ճ 3ճ Production Build 4:51.91 → 3:35.98 2:31.80 → 1:43.90 2:28.97 → 1:39.57 Development Build 3:02.79 → 2:03.73 1:28.87 → 1:06.30 1:38.34 → 1:07.52 After: ػೳϞδϡʔϧ͝ͱʹCodeSpliteͱLazyLoad - ෆཁͳCodeSplite͞Ε͍ͯͨ෦Λमਖ਼: 52 js chunks → 23 js chunks
Copyright ©2019 hokan, Inc. All rights reserved. webpackͷύϑΥʔϚϯενϡʔχϯά 29 1ճ
2ճ 3ճ Production Build 3:08.93 1:39.87 1:00.54 Development Build 2:04.49 1:06.30 → 00:28.78 1:07.52 → 00:25.93 After: HardSourceWebpackPluginͷಋೖͱCacheGroupઃఆ -Ϗϧυ݁ՌΛHardSourceWebpackPluginCacheGroupͰcache
Copyright ©2019 hokan, Inc. All rights reserved. webpackͷύϑΥʔϚϯενϡʔχϯά 30 1ճ
2ճ 3ճ Production Build 3:08.93 1:39.87 1:00.54 Development Build 2:04.49 00:28.78 00:25.93 After: HardSourceWebpackPluginͷಋೖͱCacheGroupઃఆ 1ճ 2ճ 3ճ Production Build 4:51.91 2:31.80 2:28.97 Development Build 3:02.79 1:28.87 1:38.34 Before
Copyright ©2019 hokan, Inc. All rights reserved. webpackͷύϑΥʔϚϯενϡʔχϯά 31 1ճ
2ճ 3ճ Production Build 3:08.93 1:39.87 1:00.54 Development Build 2:04.49 00:28.78 00:25.93 After: HardSourceWebpackPluginͷಋೖͱCacheGroupઃఆ 1ճ 2ճ 3ճ Production Build 4:51.91 2:31.80 2:28.97 Development Build 3:02.79 1:28.87 1:38.34 Before
Copyright ©2019 hokan, Inc. All rights reserved. webpackͷύϑΥʔϚϯενϡʔχϯά 32 1ճ
2ճ 3ճ Production Build 3:08.93 1:39.87 1:00.54 Development Build 2:04.49 00:28.78 00:25.93 After: HardSourceWebpackPluginͷಋೖͱCacheGroupઃఆ 1ճ 2ճ 3ճ Production Build 4:51.91 2:31.80 2:28.97 Development Build 3:02.79 1:28.87 1:38.34 Before
Copyright ©2019 hokan, Inc. All rights reserved. webpackͷύϑΥʔϚϯενϡʔχϯά 33 1ճ
2ճ 3ճ Production Build 3:08.93 1:39.87 1:00.54 Development Build 2:04.49 00:28.78 00:25.93 After: HardSourceWebpackPluginͷಋೖͱCacheGroupઃఆ 1ճ 2ճ 3ճ Production Build 4:51.91 2:31.80 2:28.97 Development Build 3:02.79 1:28.87 1:38.34 Before
~ ͓·͚ ~ - DLLόϯυϧͰ༻සͷߴ͍ϥΠϒϥϦΛϏϧυର֎ʹ - redux-dynamic-modulesͰɺactionsɺreducermoduleʹแ - aliasΛ࡞͠ɺimport࣌ͷύεࠈΛεοΩϦ
ࠂ
None
͝੩ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠