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
ReactHooks_CustomHookAndEncapsulation
Search
sonatard
July 29, 2019
Programming
7
740
ReactHooks_CustomHookAndEncapsulation
sonatard
July 29, 2019
Tweet
Share
More Decks by sonatard
See All by sonatard
Shopifyアプリ開発における Shopifyの機能活用
sonatard
4
250
Iteratorでページネーションを実現する
sonatard
3
1.1k
Goのエラースタックトレースの歴史と今後
sonatard
14
9.5k
Go 1.22のEnhanced ServeMux chiから移行できるのか?
sonatard
4
490
GraphQL実践ノウハウv2
sonatard
17
2.8k
プロトコル、インターフェースとしてのGraphQL
sonatard
4
2k
GraphQL実践ノウハウ/graphql-knowhow
sonatard
40
11k
GraphQLの誤解/rethinking-graphql
sonatard
67
10k
Go1.18から導入されるnetip package/netip-package
sonatard
2
1k
Other Decks in Programming
See All in Programming
광고 소재 심사 과정에 AI를 도입하여 광고 서비스 생산성 향상시키기
kakao
PRO
0
170
Remix on Hono on Cloudflare Workers
yusukebe
1
280
Amazon Bedrock Agentsを用いてアプリ開発してみた!
har1101
0
330
Jakarta EE meets AI
ivargrimstad
0
510
Content Security Policy入門 セキュリティ設定と 違反レポートのはじめ方 / Introduction to Content Security Policy Getting Started with Security Configuration and Violation Reporting
uskey512
1
520
距離関数を極める! / SESSIONS 2024
gam0022
0
280
Arm移行タイムアタック
qnighy
0
300
エンジニアとして関わる要件と仕様(公開用)
murabayashi
0
280
What’s New in Compose Multiplatform - A Live Tour (droidcon London 2024)
zsmb
1
470
AI時代におけるSRE、 あるいはエンジニアの生存戦略
pyama86
6
1.1k
Nurturing OpenJDK distribution: Eclipse Temurin Success History and plan
ivargrimstad
0
870
OnlineTestConf: Test Automation Friend or Foe
maaretp
0
100
Featured
See All Featured
Code Review Best Practice
trishagee
64
17k
Making the Leap to Tech Lead
cromwellryan
133
8.9k
Designing for humans not robots
tammielis
250
25k
Art, The Web, and Tiny UX
lynnandtonic
297
20k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
126
18k
Build The Right Thing And Hit Your Dates
maggiecrowley
33
2.4k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
6
410
Designing the Hi-DPI Web
ddemaree
280
34k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
364
24k
Side Projects
sachag
452
42k
Building Your Own Lightsaber
phodgson
103
6.1k
Speed Design
sergeychernyshev
24
610
Transcript
1 3FBDU)PPLTΧελϜϑοΫͱΧϓηϧԽ 3FBDUKTNFFUVQॳ৺ऀܴ-5ձ !TPOBUBSE
D Technologies ͦͳଠ @sonatard • Linux Server and Network Engineer
# System C • Wireless LAN Module Simulator # Cݴޠ • TCP/IP protocol stack on RTOS • TCP Offload Engine # Go • Google App Engine # TypeScript • React+Redux
• R e a c t H o o k
s ͱ • Χ ε λ Ϝ ϑ ο Ϋ ͷ ࣮ ྫ v 1 • Χ ε λ Ϝ ϑ ο Ϋ ͷ ࣮ ྫ v 2 • Χ ε λ Ϝ ϑ ο Ϋ ͷ ࣮ ྫ v 3 • Χ ε λ Ϝ ϑ ο Ϋ ͷ ࣮ ྫ v 4 • · ͱ Ί
4 3FBDU)PPLT w 3FBDU)PPLTɺ3FBDUͰՃ͞Εͨ৽ػೳɻ w TUBUFͳͲͷ3FBDUͷػೳΛɺΫϥεΛॻ͔ͣʹ͑ΔΑ͏ʹͳΔɻ
5 3FBDU)PPLT͕ఏڙ͢Δؔ w 3FBDU)PPLTɺVTF4UBUFҎ֎ʹVTF&⒎FDUɺVTF$POUFYUͳͲ߹ܭݸͷެ͕ࣜఏڙ ͢Δ͕ؔଘࡏ͢Δɻ w ࠓճVTF4UBUFΛத৺ʹઆ໌͠·͢ɻ
6 ΧελϜϑοΫͱΧϓηϧԽ w ΧελϜϑοΫͱಠࣗͷϑοΫΛ࡞͢Δ͜ͱɻ w ίϯϙʔωϯτ͔ΒϩδοΫΛநग़͢Δ͜ͱͰɺϩδοΫͷ࠶ར༻ੑ্͕͢Δɻ w ঢ়ଶͱ࣮ͷৄࡉΛΧϓηϧԽͰ͖ɺίϯϙʔωϯτʹඞཁͳͱΠϯλʔϑΣʔεͩ ͚Λެ։͢Δ͜ͱ͕ՄೳͱͳΔɻ
• R e a c t H o o k
s ͱ • Χ ε λ Ϝ ϑ ο Ϋ ͷ ࣮ ྫ v 1 • Χ ε λ Ϝ ϑ ο Ϋ ͷ ࣮ ྫ v 2 • Χ ε λ Ϝ ϑ ο Ϋ ͷ ࣮ ྫ v 3 • Χ ε λ Ϝ ϑ ο Ϋ ͷ ࣮ ྫ v 4 • · ͱ Ί
8 ΧελϜϑοΫͷ࣮ྫ࣮ߦΠϝʔδ w ίϯϙʔωϯτؒͷϖʔδωʔγϣϯΛ࣮͢ΔVTF-PDBM)JTUPSZΧελϜϑοΫɻ w ϒϥβͷIJTUPSZ"1*ͷΑ͏ͳͷɻ ࣍ ࣍ճ Δճ ϥεττοϓϥετ
Δճ ཤྺΛফڈ
9 ΧελϜϑοΫͷ࣮ྫW w ΧελϜϑοΫະ༻ίϯϙʔωϯτͱϩδοΫ͕Ұॹʹهड़͞Ε͍ͯΔ
• R e a c t H o o k
s ͱ • Χ ε λ Ϝ ϑ ο Ϋ ͷ ࣮ ྫ v 1 • Χ ε λ Ϝ ϑ ο Ϋ ͷ ࣮ ྫ v 2 • Χ ε λ Ϝ ϑ ο Ϋ ͷ ࣮ ྫ v 3 • Χ ε λ Ϝ ϑ ο Ϋ ͷ ࣮ ྫ v 4 • · ͱ Ί
11 ΧελϜϑοΫͷ࣮ྫW w ίϯϙʔωϯτ͔ΒϩδοΫΛΧελϜϑοΫʹ͢Δɻ w ίϯϙʔωϯτ͕ඞཁͳใ͚ͩΛฦ͠ɺଞΧελϜϑοΫʹӅṭ͢Δɻ w ίϯϙʔωϯτ͕ඞཁͳͷ w ɺDVSSFOU1BHF
w ૢ࡞ɺ5PQɺ/FYUɺ#BDLɺ-BTUɺ3FTFU w ˞ཤྺҰཡσόοάҎ֎ʹෆཁͳͷͰฦ͞ͳ͍ɻ
12 ΧελϜϑοΫͷ࣮ྫW w ΧελϜϑοΫ͔ΒෆཁͳIJTUPSZฦͣ͞ɺඞཁͳͱૢ࡞͚ͩΛฦ͢ɻ
13 ΧελϜϑοΫͷ࣮ྫW w ίϯϙʔωϯτ͕7JFXʹϑΥʔΧεͨ͠ίʔυͱͳΔ
• R e a c t H o o k
s ͱ • Χ ε λ Ϝ ϑ ο Ϋ ͷ ࣮ ྫ v 1 • Χ ε λ Ϝ ϑ ο Ϋ ͷ ࣮ ྫ v 2 • Χ ε λ Ϝ ϑ ο Ϋ ͷ ࣮ ྫ v 3 • Χ ε λ Ϝ ϑ ο Ϋ ͷ ࣮ ྫ v 4 • · ͱ Ί
15 ΧελϜϑοΫͷ࣮ྫW w ࠓճͷૢ࡞ʹରͯ͠ΠϯλʔϑΣʔεΛఆٛ͢Δɻ
16 ΧελϜϑοΫͷ࣮ྫW w Ұ࿈ͷૢ࡞͕ؔ࿈͕͋Δ͜ͱ͕Θ͔Γ͘͢ͳΔɻ w ଞͷίϯϙʔωϯτʹରͯ͠ૢ࡞Λ͢͜ͱ༰қʹͳΔɻ
• R e a c t H o o k
s ͱ • Χ ε λ Ϝ ϑ ο Ϋ ͷ ࣮ ྫ v 1 • Χ ε λ Ϝ ϑ ο Ϋ ͷ ࣮ ྫ v 2 • Χ ε λ Ϝ ϑ ο Ϋ ͷ ࣮ ྫ v 3 • Χ ε λ Ϝ ϑ ο Ϋ ͷ ࣮ ྫ v 4 • · ͱ Ί
18 ΧελϜϑοΫͷ࣮ྫW w 4UBDL -*'0 ͷσʔλߏΛΧελϜϑοΫͱͯ͠Γग़͢ɻ w ΧελϜϑοΫଟஈߏ͕ՄೳͳͷͰɺVTF-PDBM)JTUPSZ͔ΒVTF4UBDLΛݺͿɻ
19 ΧελϜϑοΫͷ࣮ྫW w VTF-PDBM)JTUPSZ͕4UBDLͷσʔλߏΛҙࣝͤͣɺը໘ભҠͷ੍ޚ͚ͩΛϩδοΫͱ͠ ͯ࣋ͭΑ͏ʹͳΔɻ
• R e a c t H o o k
s ͱ • Χ ε λ Ϝ ϑ ο Ϋ ͷ ࣮ ྫ v 1 • Χ ε λ Ϝ ϑ ο Ϋ ͷ ࣮ ྫ v 2 • Χ ε λ Ϝ ϑ ο Ϋ ͷ ࣮ ྫ v 3 • Χ ε λ Ϝ ϑ ο Ϋ ͷ ࣮ ྫ v 4 • · ͱ Ί
21 ΧελϜϑοΫͷ࣮ྫW w ίϯϙʔωϯτͷ࠶ඳըΛճආ͢ΔͨΊʹɺVTF$BMMCBDLͱVTF.FNPΛར༻͢Δɻ w VTF-PDBM)JTUPSZΛར༻͍ͯ͠Δίϯϙʔωϯτ͕࣮ߦ͞ΕΔͨͼʹɺίʔϧόοΫఆ ͕ٛ࠶࣮ߦ͞ΕΔ͜ͱΛճආ͢Δɻ w MPDBM)JTUPSZΛผͷίϯϙʔωϯτʹ͍ͯ͠Δ߹ͳͲʹҙຯ͕͋Δɻ
• R e a c t H o o k
s ͱ • Χ ε λ Ϝ ϑ ο Ϋ ͷ ࣮ ྫ v 1 • Χ ε λ Ϝ ϑ ο Ϋ ͷ ࣮ ྫ v 2 • Χ ε λ Ϝ ϑ ο Ϋ ͷ ࣮ ྫ v 3 • Χ ε λ Ϝ ϑ ο Ϋ ͷ ࣮ ྫ v 4 • · ͱ Ί
23 ΧελϜϑοΫͱΫϥε w ͜ͷܗʹԿ͔ݟ͕֮͑͋ΔɻɻɻΫϥεʂ w Ϋϥε w ঢ়ଶϝϯόϑΟʔϧυ w ૢ࡞ϝιου
w ॳظԽίϯετϥΫλ w ΧελϜϑοΫ w ঢ়ଶVTF4UBUF w ૢ࡞ؔ w ॳظԽϑοΫͷҾ
24 ·ͱΊ w 3FBDU)PPLTͷΧελϜϑοΫͷొʹΑΓɺΦϒδΣΫτࢦͷϊϋ͕׆༻Ͱ͖ ΔΑ͏ʹͳͬͨɻ w దͳઃܭʹΑΓҎԼ͕࣮ݱՄೳ w ୯Ұͷݪଇ 431
ɺใӅṭ ΧϓηϧԽ w Մಡੑͷ্ɺ࠶ར༻ੑͷ্
25 ·ͱΊ w ࠷େͷϝϦοτ w ίϯϙʔωϯτʹґଘ͠ͳ͍ϩδοΫ͚͕ͩ044ͱͯ͠ڞ༗͞ΕΔΑ͏ʹͳͬͨ w ࠓޙঢ়ଶΛ࣋ͭϩδοΫΛॻ͘લʹɺݕࡧ͢Δ͜ͱΛ͓͢͢Ί͠·͢ɻ w IUUQTHJUIVCDPNTUSFBNJDISFBDUVTF
w IUUQTOJLHSBGHJUIVCJPSFBDUIPPLT w IUUQTVTFIPPLTDPN