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
reading-mtc2018-web.pdf
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Daiki Ihara
November 19, 2018
Programming
580
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
reading-mtc2018-web.pdf
LT at Roppongi.js #7
Daiki Ihara
November 19, 2018
More Decks by Daiki Ihara
See All by Daiki Ihara
tc39_study
sasurau4
1
790
ArrayBufferとBinary
sasurau4
1
660
CLIから見るAngular, React, Vue
sasurau4
1
990
Metro Bundler in Web
sasurau4
0
1k
Other Decks in Programming
See All in Programming
KotlinConf Extended South Korea 2026 Keynote
l2hyunwoo
0
130
AIの中の人になってみる
htkym
0
160
自分的「カンファレンスの楽しみ方」
syumai
0
190
高専、大学編入、そして未踏へ〜プロダクト開発とキャリアの歩み - Technical College, University Transfer, and On to “Mitou” / My Journey in Product Development and Career
pkmiya
0
130
PyConJP2026_wat_Python × Signal Processing: How to Draw Pictures with Sound Using Spectrogram Art
wat
0
660
FastAPI の並行処理モデルを完全に理解する
hoto17296
9
3.7k
書籍「プロフェッショナルAI駆動開発」紹介スライド
juntaromatsumoto
0
960
Vibes Containers 〜AIで変わるコンテナ設計と運用〜
tkikuc
1
460
Deep dive into the select statement (GopherCon UK)
jespino
0
170
変化を抱擁するドキュメントの作り方 - ビジネスルール駆動開発がもたらす、コードとの新しい関係
ioki
2
110
[DroidKaigi 26] How We Moved from Android Studio to Slack
thisaay
0
200
tsc.rip を支える技術 / Kyoto.なんか #8
susisu
0
4.3k
Featured
See All Featured
Visualization
eitanlees
152
17k
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
490
Odyssey Design
rkendrick25
PRO
2
800
The Cost Of JavaScript in 2023
addyosmani
55
10k
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
310
ラッコキーワード サービス紹介資料
rakko
1
4.7M
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.8k
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
490
Deep Space Network (abreviated)
tonyrice
0
290
Crafting Experiences
bethany
1
280
The World Runs on Bad Software
bkeepers
PRO
72
12k
Bootstrapping a Software Product
garrettdimon
PRO
306
120k
Transcript
Reading mtc2018-web by sasurau4 Roppongi.js #7 at Retty
• Name: Daiki Ihara • ID: @sasurau4 • Job: react-native
/ Server Side Kotlin / GraphQL • Hobby: React, Typescript • Mind: Front-end engineer 自己紹介
今日の話題 Mercari Tech Conf 2018 LP https://github.com/mercari/mtc2018-web
What is mtc2018 • Mercari Tech Conf(MTC)は、株式会社メルカリをはじめとするメルカリグルー プ各社が、これから目指す方向や、これから取り組む技術的なチャレンジについ てご紹介するエンジニア向けの技術カンファレンスです。 ※https://techconf.mercari.com/2018#aboutより一部抜粋
◦ • 10月4日に六本木アカデミーヒルズで開催された
Why mtc2018-web
MTC2018 カンファレンスLPの裏話 〜GraphQL編〜
気になるポイント • Typescript + GraphQL • Apollo • GitHubにコード公開されてる
よし、読むぞ
レポジトリを眺める https://github.com/mercari/mtc2018-web • monorepo • server / web ディレクトリ •
rootのschema.graphqlがGraphQLのスキーマ定義 • rootにmockServerもいる
webのpackage.jsonを眺める • next • apollo-client • i18next • react •
typescript • styled-components
さあ、コードリーディングだ
分からない
分からないポイント • nextは一体何をやっているんだ... • componentsやcontainersはいいとして、pages??? • routes.jsには’/2018/session/:id’のroutingしかない...
Next.js Learn やりました ※https://nextjs.org/learn/
知見
• components -> LazyImage.tsx • 名の通り、画像の遅延読み込み用コンポーネント • Intersection Observer APIを使用
◦ 要素がビューポートと交差するか監視する方法を提供する API ◦ Safariはsupportされていないので、webpackでバンドルする際にpolyfillしている 1. LazyImage Component
2. timetableデータの持ち方 mock server production
2. timetableデータの持ち方 mock server production
mockなのに段組が変わらない
2. timetable データの持ち方 • store -> timetable.tsの中でオブジェクトとして定義 • sessionのidをフロントで持つことでtimetableの表示をコントロール •
ウェブアプリケーションにおいてはサーバーしか知らないidを前もって、フロント が知っていることで煩雑な条件分岐を回避
おまけ
Mercari Engineering Blog 「MTC2018 カンファレンスLPの裏話 〜インフラ編〜」より
作ってみた
デモ
まとめ • mtc2018-webレポジトリは知見がいっぱい ◦ i18n ◦ SSR ◦ componentの分け方 ◦
GraphQL Fragment ◦ Apollo Client ◦ etc. • Typescript + GraphQLはいいぞ
Thank you