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
260
支付宝小程序的开放架构
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
570
Other Decks in Technology
See All in Technology
20260326_AIDD事例紹介_ULSC.pdf
findy_eventslides
0
400
スクラムを支える内部品質の話
iij_pr
0
180
OCI技術資料 : 証明書サービス概要
ocise
1
7.2k
Babylon.js Japan Activities (2026/4)
limes2018
0
150
AI時代のIssue駆動開発のススメ
moongift
PRO
0
350
AI時代のシステム開発者の仕事_20260328
sengtor
0
320
互換性のある(らしい)DBへの移行など考えるにあたってたいへんざっくり
sejima
PRO
0
520
自分をひらくと次のチャレンジの敷居が下がる
sudoakiy
5
1.7k
来期の評価で変えようと思っていること 〜AI時代に変わること・変わらないこと〜
estie
0
130
MIX AUDIO EN BROADCAST
ralpherick
0
140
40代からのアウトプット ― 経験は価値ある学びに変わる / 20260404 Naoki Takahashi
shift_evolve
PRO
4
760
Oracle Cloud Infrastructure(OCI):Onboarding Session(はじめてのOCI/Oracle Supportご利⽤ガイド)
oracle4engineer
PRO
2
17k
Featured
See All Featured
Art, The Web, and Tiny UX
lynnandtonic
304
21k
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
370
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.2k
Producing Creativity
orderedlist
PRO
348
40k
エンジニアに許された特別な時間の終わり
watany
106
240k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Believing is Seeing
oripsolob
1
100
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.4k
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
GraphQLとの向き合い方2022年版
quramy
50
14k
The Art of Programming - Codeland 2020
erikaheidi
57
14k
Are puppies a ranking factor?
jonoalderson
1
3.2k
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