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
280
支付宝小程序的开放架构
yiminghe
0
210
gitc2016 react based architecture
yiminghe
1
190
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
Datadog 認定試験の概要と対策
uechishingo
0
220
自称宇宙最速で不合格となったAIP-C01にリベンジを果たすべくAIで問題集アプリを作ってみた。
yama3133
0
260
「気づいたら仕事が終わっている」バクラクAIエージェント本番運用の裏側 / layerx-bakuraku-aie2026
yuya4
6
2.6k
インフラが苦手でも大丈夫! 紙芝居 Kubernetes -WWGT 10周年編-
aoi1
1
320
Java正規表現エンジン(NFA)の仕組みと パフォーマンスを維持するための最適化手法
takeuchi_132917
0
170
Databricks における 生成AIガバナンスの実践
taka_aki
1
120
AI駆動開発でなんでもハンズオン環境をつくってみた
yoshimi0227
0
190
プラットフォームエンジニア ワークショップ/ platform-workshop
databricksjapan
0
160
個人AIからチームAIへ:開発における品質と生産性の再設計
moongift
PRO
0
350
サプライチェーンセキュリティの空白地帯 - 信頼できる”依存性”の未来を考える
rung
PRO
2
610
探して_入れて_作って_使う_Agent_Skills___LT.pdf
peintangos
2
140
組織の中で自分を経営する技術
shoota
0
230
Featured
See All Featured
VelocityConf: Rendering Performance Case Studies
addyosmani
333
25k
The Curse of the Amulet
leimatthew05
1
13k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
280
Building Applications with DynamoDB
mza
96
7.1k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.1k
The untapped power of vector embeddings
frankvandijk
2
1.7k
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
390
Discover your Explorer Soul
emna__ayadi
2
1.1k
Thoughts on Productivity
jonyablonski
76
5.2k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
30k
The SEO identity crisis: Don't let AI make you average
varn
0
480
Practical Orchestrator
shlominoach
191
11k
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