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
Kotlin Multi-platform(?)
Search
Panini
June 27, 2018
Technology
1
650
Kotlin Multi-platform(?)
Panini
June 27, 2018
Tweet
Share
More Decks by Panini
See All by Panini
Kotlin 1.5 preview
panini
1
380
Java谷園から逃げ出した話
panini
0
300
Kotlin 1.4-rc
panini
0
180
Fixing Broken Robots - Android Mutation Testing
panini
0
130
Kotlin Multiplatform
panini
2
510
build.gradle.kts
panini
2
2.1k
Convert Java file to Kotlin file ⌥⇧⌘K
panini
0
960
Introducing Android P
panini
2
750
Display Cutout
panini
1
490
Other Decks in Technology
See All in Technology
生成AIサービスPanorama AIご説明資料
sdt
0
300
Challenges - Open Farming Hackdays 2024
loleg
0
560
統計的学習理論読み Chapter 1
kmatsui
3
820
関数型DDDの理論と実践:「決定を遅らせる」を先につくり、 ビジネスの機動力と価値をあげる
knih
2
470
GraphQLに入門してみた
chiroruxx
2
120
チーム単位で保守性を高める:独自指標と向上にむけた実践
tarappo
0
300
統計的学習理論読み Chapter 2
kmatsui
1
210
20240321_生成AI時代のDevOps
kzkmaeda
2
610
期待しすぎずに取り組む両面 TypeScript
shozawa
2
290
XRミーティング 2024-03-20
1ftseabass
PRO
0
100
#51 “Empowering Azure Storage with RDMA”
cafenero_777
3
210
あらゆる商品を扱う商品データベースを再設計した話 / product db re-architecture
rince
8
3.6k
Featured
See All Featured
Producing Creativity
orderedlist
PRO
335
39k
Optimising Largest Contentful Paint
csswizardry
7
2.3k
How To Stay Up To Date on Web Technology
chriscoyier
781
250k
Gamification - CAS2011
davidbonilla
76
4.5k
Facilitating Awesome Meetings
lara
39
5.5k
Infographics Made Easy
chrislema
237
18k
Scaling GitHub
holman
456
140k
Thoughts on Productivity
jonyablonski
57
3.8k
Optimizing for Happiness
mojombo
369
69k
10 Git Anti Patterns You Should be Aware of
lemiorhan
644
57k
Side Projects
sachag
451
41k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
1
1.2k
Transcript
Multiplatform Kotlin(?) Kotlin Developers Meetup
About Me • Matthew Vern / Panini • Twitter: @callipan
Github: panpanini • Mercari, Inc • Android Engineer (US) •
[email protected]
About Me • Matthew Vern / Panini • Twitter: @callipan
Github: panpanini • Mercari, Inc • Android Engineer (US) •
[email protected]
• React Native Engineer??
React Native • Build native mobile apps using JavaScript and
React • “Write Once, Run Anywhere” • Works both on Android & iOS • Hot reload • Interfaces with native Kotlin/Swift code
React Native @ Mercari US • Used in Profile &
Chat screens • Great for simple screens • Easy feature parity between platforms • But...
I wanna write Kotlin
Kotlin.js • Transpiles Kotlin to JavaScript • Kotlin-react https://github.com/JetBrains/create-react-kotlin-app •
• Kotlin-React-Native?
Kotlin React Native • Create Kotlin JS project inside ReactNative
project • Link React Native JS to Kotlin JS output
Kotlin React Native • Create wrapper for React Native JS
• @JsModule • external
Kotlin React Native • React has a lot of ceremony
to create components • Abstract as much away with DSL • Makes UI code much cleaner
Kotlin React Native • React has a lot of ceremony
to create components • Abstract as much away with DSL • Makes UI code much cleaner
Hot Reload • “Keep the app running and to inject
new versions of the files that you edited at runtime” • Kotlin has to be compiled though...
Gradle Continuous Build https://blog.gradle.org/introducing-continuous- build • “As of 2.5, Gradle
supports continuous build execution, which will automatically re-execute builds when changes are detected to its inputs.” • Anytime a file is changed, gradle will rerun the task • Hot reload!
Summary • We can write React Native in Kotlin! •
Supports Hot Reloading • Kotlin DSL makes building UI easy • Can run same code on Android & iOS
Summary • The Kotlin we write is 90% JavaScript.. •
dynamic • Lots of boilerplate code • Very little documentation • Lets just use Kotlin multiplatform instead