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
Daiki Ihara
November 19, 2018
Programming
560
1
Share
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
770
ArrayBufferとBinary
sasurau4
1
650
CLIから見るAngular, React, Vue
sasurau4
1
970
Metro Bundler in Web
sasurau4
0
990
Other Decks in Programming
See All in Programming
Coding as Prompting Since 2025
ragingwind
0
830
Running Swift without an OS
kishikawakatsumi
0
830
ドメインイベントでビジネスロジックを解きほぐす #phpcon_odawara
kajitack
3
760
AWS re:Invent 2025の少し振り返り + DevOps AgentとBacklogを連携させてみた
satoshi256kbyte
3
160
iOS機能開発のAI環境と起きた変化
ryunakayama
0
180
クラウドネイティブなエンジニアに向ける Raycastの魅力と実際の活用事例
nealle
2
190
Claude Codeをカスタムして自分だけのClaude Codeを作ろう
terisuke
0
130
アーキテクチャモダナイゼーションとは何か
nwiizo
17
5.1k
UIの境界線をデザインする | React Tokyo #15 メイントーク
sasagar
2
340
KagglerがMixSeekを触ってみた
morim
0
380
Codex CLIのSubagentsによる並列API実装 / Parallel API Implementation with Codex CLI Subagents
takatty
2
920
JAWS-UG横浜 #100 祝・第100回スペシャルAWS は VPC レスの時代へ
maroon1st
0
130
Featured
See All Featured
Amusing Abliteration
ianozsvald
1
150
How to build a perfect <img>
jonoalderson
1
5.4k
The Mindset for Success: Future Career Progression
greggifford
PRO
0
310
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
190
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
770
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
160
Building Flexible Design Systems
yeseniaperezcruz
330
40k
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
420
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
450
Fireside Chat
paigeccino
42
3.9k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.8k
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