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
React Native のすゝめ Tipsまよゐみち
Search
@YutamaKotaro
June 10, 2016
Technology
2
640
React Native のすゝめ Tipsまよゐみち
React Native meetup#2 LTです!
ご指摘をいただき修正いたしました!
@YutamaKotaro
June 10, 2016
Tweet
Share
More Decks by @YutamaKotaro
See All by @YutamaKotaro
0->1 現場におけるReactNative
yutamakotaro
0
170
ライブラリはしご酒
yutamakotaro
0
140
React + Valtio
yutamakotaro
0
110
My experience for 3 years with React Native
yutamakotaro
0
43
React Nativeと共に歩んだ3年間【TECH STAND #3】
yutamakotaro
1
1.3k
React Native Game Engine in React Native Tech Blog Event
yutamakotaro
1
1.6k
React Native Book
yutamakotaro
0
54
AWS Summit2019 airCloset section
yutamakotaro
1
200
フルJSアーキテクトで作るエアークローゼット
yutamakotaro
2
520
Other Decks in Technology
See All in Technology
RubyのWebアプリケーションを50倍速くする方法 / How to Make a Ruby Web Application 50 Times Faster
hogelog
3
940
Amazon Personalizeのレコメンドシステム構築、実際何するの?〜大体10分で具体的なイメージをつかむ〜
kniino
1
100
【Startup CTO of the Year 2024 / Audience Award】アセンド取締役CTO 丹羽健
niwatakeru
0
1.2k
テストコード品質を高めるためにMutation Testingライブラリ・Strykerを実戦導入してみた話
ysknsid25
7
2.6k
Amplify Gen2 Deep Dive / バックエンドの型をいかにしてフロントエンドへ伝えるか #TSKaigi #TSKaigiKansai #AWSAmplifyJP
tacck
PRO
0
390
iOS/Androidで同じUI体験をネ イティブで作成する際に気をつ けたい落とし穴
fumiyasac0921
1
110
SREによる隣接領域への越境とその先の信頼性
shonansurvivors
2
520
飲食店データの分析事例とそれを支えるデータ基盤
kimujun
0
110
生成AIが変えるデータ分析の全体像
ishikawa_satoru
0
160
10XにおけるData Contractの導入について: Data Contract事例共有会
10xinc
6
650
OTelCol_TailSampling_and_SpanMetrics
gumamon
1
180
20241120_JAWS_東京_ランチタイムLT#17_AWS認定全冠の先へ
tsumita
2
290
Featured
See All Featured
Practical Orchestrator
shlominoach
186
10k
How to Think Like a Performance Engineer
csswizardry
20
1.1k
Making the Leap to Tech Lead
cromwellryan
133
8.9k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
250
21k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
232
17k
Site-Speed That Sticks
csswizardry
0
27
Faster Mobile Websites
deanohume
305
30k
How STYLIGHT went responsive
nonsquared
95
5.2k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
44
2.2k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
26
2.1k
Done Done
chrislema
181
16k
Transcript
React Nativeͷ͢ʍΊ Tips·ΑΙΈͪ ˏYutamaKotaro
ABOUT ME @YutamaKotaro ▸ ໊ݹग़ͷͬΆ͜;ΖΜͱ͑Μ Ͳ͑Μ͡ʹ͋ʢ͍̎̒͞ʣ ▸ Webྺɿ̍ͪΐͬͱ ▸ ࣾձਓྺɿ2(3ಥೖɾɾɾ)
▸ React & ReduxΛͬͨ։ൃΛߦͬ ͍ͯ·͢ʢ᛭ୖຏֶश͠ͳ͕ Βɾɾɾʣ
React Native bring me events React Native Λ࢝Ίͯىͬͨ͜͜ͱɾɾɾɾʂ ▸ pureͳίϯϙʔωϯτ༷Ͱͭ·͖ͮ·ͨ͠ɻ
▸ ਖ਼ɺݸਓతʹެࣜυΩϡϝϯτ͕ݟͮΒ͍ɾɾɾɾͲ͏͍͍͔͔ͯ͠Βͳ͍ͳΓʹؤுͬ ͯΈ·ͨ͠ɻ ▸ ຊpureͳίϯϙʔωϯτΛ͍ͬͯͯ٧·ͬͨ͜ͱͱʹ͍ͭͯհ͠ ͍ͨͱࢥ͍·͢ʂ ▸ ͓ৄ͍͠ํଞʹ͍͍Γํ͕͋Εڭ͍͚͑ͯͨͩ·͢ͱ͍Ͱ͢ɻ
RECOMMEND REACT NATIVE React Native ͷ͢ʍΊ ▸ ϑϩϯτΤϯυΤϯδχΞ(Reacter) ͳΒ͔͚ͯ͠·͏ ▸
ϋΠϒϦουΞϓϦ(Cordova)ͱൺ ͯຊʹωΠςΟϒͬΆ͍ΞϓϦΛ ࡞Δ͜ͱ͕Ͱ͖Δɻ ▸ ίʔσΟϯάɺσόοά͍ͭͷ૬ Λ͑Δ(Atom( Sublime ) , Chrome ) ▸ ωΠςΟϒ։ൃٕज़ͦΜͳʹ͍Β ͳ͍
▸Γ࢝ΊΔૣɾɾɾɾ
▸ φϏήʔγϣϯόʔ͕̎छྨબΔʂʂ ▸ ͋ɾɾͳΜ͔ࢥͬͨ௨Γʹಈ͔ͳ͍ɾɾɾɾ
THE PATH OF DESTINY Navigator VS NavigatorIOS ▸ Navigator.NavigationBar ▸
iOS, AndroidͰಈ͘ ▸ React Component ▸ ࣗ༝ɹಈ࡞͕एׯ؇ຫ ▸ NavigatorIOS ▸ iOSͰ͔͠ಈ͔ͳ͍ ▸ UINavigationController ▸ റΓɹಈ࡞ߴ
THE PATH OF DESTINY Navigator VS NavigatorIOS ▸ Navigator.NavigationBar ▸
iOS, AndroidͰಈ͘ ▸ React Component ▸ ࣗ༝ɹಈ࡞͕؇ຫ ▸ NavigatorIOS ▸ iOSͰ͔͠ಈ͔ͳ͍ ▸ UINavigationController ▸ റΓɹಈ࡞ߴ Impression ▸ Navigator.NavigationBar ▸ Θ͔Γ͍͚͢Ͳαϯϓϧগͳ͍ ▸ ॻ͘ͷগ͠໘͍͘͞ ▸ NavigatorIOS ▸ ؆୯ʹ͑Δ͚Ͳɺͪΐͬͱบ ͕͋Δ͜ͱ ▸ ͱͯαΫαΫ ▸ บͱ͍͏͔റΓʁ
▸ ϘλϯΛӈԼʹஔ͖͍ͨ ▸ ͳ͔ͥright, bottom͕ͳ͍ ▸ ͳ͔ͥright, bottom͕ޮ͔ͳ͍
▸ Ͳ͏ͬͯӈԼஔ͢ΔΜͩɾɾʁ ▸ fixedͳ͍Μ͚ͩͲɾɾɾʂʂʂ ▸ flex…………1?
DEAR CSS PROPERTIES IN HEAVEN StyleSheet Properties like CSS ▸
CSSͬΆ͍͚ͲCSS͡Όͳ͍ϓϩύςΟ ▸ inlineʹ֮ΊΔɻ ▸ flex:1ͱ͍͏ṖΊ͍ͨهड़ ▸ positionͷϓϩύςΟabsolute, relativeͷΈ ▸ top, left͋Δ͕right, bottomͳ͍ ▸ top, left, right, bottomflexΛҙࣝ͠ͳ͍ͱ ޮ͔ͳ͍Α͏ʹײ͡Δ ▸ ˋࢦఆෆՄೳ ▸ top, leftΛݻఆͰࢦఆ͢Δͱԣ͖ଞͷ ͰϨΠΞτ่͕ΕΔ
DEAR CSS PROPERTIES IN HEAVEN What is flex? ▸ ͱΓ͋͑ͣ̍ʹ͠ͱ͚ʂͱ͍͏ͷͰͳ
͍ɻଟ͍͚Ͳɾɾɾɻ ▸ flexboxతͳϓϩύςΟͱηοτͰ͏ɻ alignItems, flexDirection…. ▸ flexDirectionʹର͢Δൺ Instead of right, bottom, ’fixed’ ▸ ӈԼஔ͕େมͳ͜ͱɻflexboxΛۦ ͯ͠ɺflex-endͳͲͰΓΔɻ ▸ ݻఆஔposition:’absolute’ ▸ εΫϩʔϧ(ScrollViewͳͲ)Λ࣮͠ͳ͚Ε εΫϩʔϧͰ͖ͳ͍
▸ ListΛදࣔͤ͞·ͤ͏
▸ ListViewɾɾɾ ▸ ScrollViewɾɾɾ ▸ Μɾɾɾɾʁ
SHOULD I USE LISTVIEW OR SCROLLVIEW Scroll View ▸ ७ਮʹεΫϩʔϧྖҬΛઃ͚Δ
▸ ײత͔ͭɺ൚༻త way to display List ▸ Ϧετ߲͕֬ఆ͍ͯ͠ͳ͍ͷͰε Ϋϩʔϧ͍ͤͨ͞߹͕ଟ͍ɻ ▸ ํ๏ೋͭʢ͙Β͍ʣ ▸ ScrollViewίϯϙʔωϯτΛ͏ ▸ ListViewίϯϙʔωϯτΛ͏ ▸ ListView Θͳͯ͘ScrollView͑ εΫϩʔϧͰ͖ΔϦετΛ࡞ΕΔɻ ListView ▸ Ϧετ༻ʹScroll ViewΛϥούʔͨ͠ ͷɻ ▸ දࣔʹσʔλ͕ඞཁ ▸ ͨͩ୯ʹը໘ʹऩ·Βͳ͘εΫϩʔϧ ͍ͤͨ͞߹ʹ͑ͳ͍ ▸ sectionΛ͏͜ͱ͕Ͱ͖Δɻ ▸ rowHasChangeͳͲͷΠϕϯτѻ͏͜ͱ ͕Ͱ͖Δɻ ▸ http://moduscreate.com/react-native-listview-with-section-headers/
CONCLUSION ·ͱΊ ▸ ݸਓతʹެࣜͷυΩϡϝϯτ͋Μ·Γৄ͘͠ͳ͍ͱࢥͬͨ ▸ ListView.dataSourceͱ͔ຊʹࡌͬͯͳͯ͘ٽ͖ͦ͏ʹͳͬͨ ▸ React NatvieίϯϙʔωϯτʹͦΕͧΕɺҙٛͱศརͳ͍ํ͕ ͋Δɻ
▸ Xcode͕ຊʹۂऀɻ ▸ ΄ͱΜͲ৮Βͳ͍͚ͲɺϑΥϯτՃ֎෦ίϯϙʔωϯτՃͰ৮Βͳ ͍ͱ͍͚ͳ͍γνϡΤʔγϣϯɾɾ ▸ গ͚͚ͩͩ͠ͲɺωΠςΟϒίʔυΛॻ͔ͳ͍ͱ͍͚ͳ͍γνϡΤʔγϣ ϯɾɾɾɻࠓޙʹظʂʂ ▸ ͔͠͠ɺjs͔ͬͨ͜͠ͱͳͯ͘ͳΜͱ͔ͳͬͨɻ
▸͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠ʂʂ ▸ ·ͩ·ͩएͰ͕͢ɺԿଔΑΖ͓͘͠ئ͍ க͠·͢ʂ