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
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Daiki Ihara
November 19, 2018
Programming
570
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
780
ArrayBufferとBinary
sasurau4
1
650
CLIから見るAngular, React, Vue
sasurau4
1
990
Metro Bundler in Web
sasurau4
0
1k
Other Decks in Programming
See All in Programming
わからない話を追いかけたら、プログラミング言語を作る側にいた
ydah
3
500
生成AIで帳票OCRが「簡単に」作れる時代になった?
kon_shou
0
900
ITヒヤリハットを整理してみた ~ライフサイクルと原因から考える再発防止策~
koukimiura
1
140
自動化したのに回らない テスト運用の壁―AI時代の品質責任と生産性
mfunaki
0
170
Detecting Compromised CI with eBPF and Cilium Tetragon
lizrice
0
180
AWS CDK を「作」ってみた 〜フルスクラッチで見えた CDK の裏側〜 / aws-cdk-from-scratch
gotok365
3
2.8k
実装をデザインガイドラインに追従させるための取り組み / 260731-dip-mosh-design-system
dachi023
0
450
ルールを書いて終わらせないハーネスエンジニアリング
yug1224
4
1.9k
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
590
freee が目指す データ マネジメント戦略 AI-Ready 時代を支える 攻めのガバナンスとは
freee
PRO
0
360
全PRの83%がAIレビューだけでマージできるようになった開発組織はその後どうなったか
athug
1
1.6k
Lean は証明の正しさを確認するためだけのツールって思ってませんか?
inoueasei
1
160
Featured
See All Featured
Color Theory Basics | Prateek | Gurzu
gurzu
0
420
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
2.1k
What's in a price? How to price your products and services
michaelherold
247
13k
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
700
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
3
1.1k
Designing for Timeless Needs
cassininazir
1
440
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
200
Bash Introduction
62gerente
615
220k
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
1
2.8k
Accessibility Awareness
sabderemane
1
180
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
650
Abbi's Birthday
coloredviolet
3
9.3k
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