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
react best practice
react best practice
yiminghe
May 14, 2015
More Decks by yiminghe
See All by yiminghe
小程序终端技术架构
yiminghe
0
270
支付宝小程序的开放架构
yiminghe
0
200
gitc2016 react based architecture
yiminghe
1
180
antd at qcon2016
yiminghe
1
240
react-based architecture
yiminghe
2
180
React Ecosystem At Ant Financial
yiminghe
4
2.3k
ant design preview
yiminghe
1
330
react at alipay
yiminghe
43
4.5k
form validation in react
yiminghe
4
580
Other Decks in Technology
See All in Technology
マルチエージェント × ハーネスエンジニアリング × GitLab Duo Agent Platformで実現する「AIエージェントに仕事をさせる時代へ。」 / 20260421 GitLab Duo Agent Platform
n11sh1
0
160
Amazon S3 Filesについて
yama3133
2
210
AI時代における技術的負債への取り組み
codenote
1
1.5k
エージェントスキルを作って自分のインプットに役立てよう
tsubakimoto_s
0
370
データを"持てない"環境でのアノテーション基盤設計
sansantech
PRO
1
120
[OpsJAWS 40]リリースしたら終わり、じゃなかった。セキュリティ空白期間をAWS Security Agentで埋める
sh_fk2
3
240
実践ハーネスエンジニアリング:TAKTで実現するAIエージェント制御 / Practical Harness Engineering: AI Agent Control Enabled by TAKT
nrslib
11
4.6k
最近の技術系の話題で気になったもの色々(IoT系以外も) / IoTLT 花見予定会(たぶんBBQ) @都立潮風公園バーベキュー広場
you
PRO
1
240
サイボウズ 開発本部採用ピッチ / Cybozu Engineer Recruit
cybozuinsideout
PRO
10
78k
コードや知識を組み込む / Incorporate Code and Knowledge
ks91
PRO
0
150
EBS暗号化に失敗してEC2が動かなくなった話
hamaguchimmm
2
200
2026年、知っておくべき最新 サーバレスTips10選/serverless-10-tips
slsops
13
5.2k
Featured
See All Featured
The World Runs on Bad Software
bkeepers
PRO
72
12k
Accessibility Awareness
sabderemane
1
100
Build your cross-platform service in a week with App Engine
jlugia
234
18k
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
180
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
WENDY [Excerpt]
tessaabrams
10
37k
The Spectacular Lies of Maps
axbom
PRO
1
700
Marketing to machines
jonoalderson
1
5.2k
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2k
HDC tutorial
michielstock
2
630
Thoughts on Productivity
jonyablonski
76
5.1k
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
64
55k
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