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 best practice
Search
yiminghe
May 14, 2015
Technology
230
3
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
react best practice
react best practice
yiminghe
May 14, 2015
More Decks by yiminghe
See All by yiminghe
小程序终端技术架构
yiminghe
0
290
支付宝小程序的开放架构
yiminghe
0
230
gitc2016 react based architecture
yiminghe
1
190
antd at qcon2016
yiminghe
1
250
react-based architecture
yiminghe
2
190
React Ecosystem At Ant Financial
yiminghe
4
2.3k
ant design preview
yiminghe
1
350
react at alipay
yiminghe
43
4.6k
form validation in react
yiminghe
4
580
Other Decks in Technology
See All in Technology
TypeScript入門 2026
recruitengineers
PRO
3
500
モノリス Rails でも日中に rails db:migrate を走らせたい! / Daytime rails db:migrate on Monolithic Rails!
euglena1215
4
550
ブラウザ研修 2026
recruitengineers
PRO
5
800
OSPN.JPバージョンアップ作業進捗のご報告 / 20260801-osc26kyoto
akkiesoft
0
420
AI駆動開発は個人技からチーム戦へ:組織でAIを使いこなすための実践設計
moongift
PRO
0
480
Invisible to AI? Making TYPO3 Sites Quotable by AI Search Systems
wolfgangwagner
0
170
Cursor Meetup Sapporo - Cursor物語 続編
cocacola917
0
140
【CEDEC2026】『Relink』を拡張せよ - 『GRANBLUE FANTASY: Relink - Endless Ragnarok』の開発速度と品質を守るCI運用
cygames
PRO
0
140
Webアクセシビリティ入門 2026
recruitengineers
PRO
3
460
名刺メーカーDevグループ 紹介資料
sansan33
PRO
0
1.2k
toio・myCobotでフィジカルAIっぽいことを行うための検討(とりあえず調査) / フィジカルAI LT(IoTLTによる開催)
you
PRO
0
300
【CEDEC2026】グラフィックスエンジニアのためのニューラルシェーディング入門
cygames
PRO
0
130
Featured
See All Featured
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
450
Marketing to machines
jonoalderson
1
5.7k
Chasing Engaging Ingredients in Design
codingconduct
0
260
Raft: Consensus for Rubyists
vanstee
141
7.6k
How to Ace a Technical Interview
jacobian
281
24k
The World Runs on Bad Software
bkeepers
PRO
72
12k
Testing 201, or: Great Expectations
jmmastey
46
8.2k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
930
HTML-Aware ERB: The Path to Reactive Rendering @ RubyCon 2026, Rimini, Italy
marcoroth
3
420
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
310
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.4k
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.5k
Transcript
react best prac*ce
[email protected]
承玉
Outline • Technology stack – react/koa/webpack/npm • Prac*ce
• Summary
• Technology stack
react • react: library for build user interface
react • render
react • diff
React-‐components • Components based on react • hDps://github.com/react-‐component
react-‐component
koa • Koa: next genera*on web framework for node.js
chain
chair • 基于 koa,整合支付宝基础服务 – Session – Hsf(Tr) – Drm
– Tair – Ls
chair • Router • logger • Proxy (generate
from jar)
webpack • hDp://webpack.github.io/ • Module bundler
npm • Package manager for javascript (react,jquery,angular…)
tnpm • 集团内部源,支持私有包
• prac*ce
tnpm • package.json:
commonjs • commonjs for browser and server
react • Components Composi*on
Custom page • aliloan
React rerender • Render on data change
webpack • commonjs compile, sourcemap • Common code extrac*on
• Css extrac*on
webpack • Development – Build into memory – koa middleware
– No hash
webpack • Build – Compress – hash
jsx on server • jsx as skeleton on server
share code with server • u*l/enum/jsx … • app/common/getUserFromIvr.js:
dev.assets • Half dead – Serve sta*c resources in nodejs
memory (webpack) – Speedy cbd cycle
summary • server-‐browser harmony – js rules all – Use
React on server and browser – Use npm on server and browser – Use webpack on server and browser