Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Reactで学ぶUIコンポーネントデザイン / UI Component Design wit...
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
mikesorae
July 12, 2017
Technology
3.4k
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Reactで学ぶUIコンポーネントデザイン / UI Component Design with React
mikesorae
July 12, 2017
More Decks by mikesorae
See All by mikesorae
AI Native なプロダクト組織の立ち上げ方 : 生産性 100 倍への挑戦
mikesorae
0
5.3k
Dataflow周りで地雷を踏みまくった話
mikesorae
0
24
Functional Programming in Frontend Elm編
mikesorae
1
140
Other Decks in Technology
See All in Technology
AIカンパニーへの転換を支えた、エンジニアの仕事の再定義
kworkdev
PRO
2
980
アウトプット初心者、半年間のふりかえり
4o1sobblue
0
390
[AWS 秋のクラウドオペレーション祭り 2026]AWS DevOps Agentで変わるリリースと運用対応 ~リリース管理機能と Directed actions のご紹介~
furuton
4
1.3k
go-sqletch
moznion
0
140
AIがコードを書く時代に、エンジニアは何で自分の価値を証明するのか / In an era where AI writes code how do engineers prove their value
carta_engineering
3
1k
DevelopersIO 2026 知識の地図を描く ─ オントロジーとは何か?
ishikawa_satoru
1
1.6k
継続的なAIコスト最適化
bgpat
1
310
初海外で注意すべきこと12選!!!安全快適なre:invent生活にするために
yuuuuuuu168
1
100
DWH の限界突破! AI エージェント向け爆速リアルタイムデータ基盤 ClickHouse
jozono
1
430
Railsで挑む大量データ永続化 〜600億件を永続化するための設計とボトルネックとの戦い〜
occhi
1
500
Persisting Massive Data with Rails ~Designing for 60 billion rows, and fighting the bottlenecks~ Railsで挑む大量データ永続化 〜600億件を永続化するための設計とボトルネックとの戦い〜
occhi
0
680
How to Design Configuration for Rails Applications
willnet
1
650
Featured
See All Featured
Everyday Curiosity
cassininazir
0
350
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
320
It's Worth the Effort
3n
188
29k
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
600
SEO for Brand Visibility & Recognition
aleyda
0
4.8k
Making Projects Easy
brettharned
120
6.8k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
2
410
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
[RailsConf 2023] Rails as a piece of cake
palkan
59
7.1k
Believing is Seeing
oripsolob
1
240
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
56
3.5k
Transcript
ReactͰֶͿ UIίϯϙʔωϯτ σβΠϯ
ࣗݾհ • iOS/AndroidΞϓϦ։ൃ • 6ؒͰ30ຊͷεϚϗΞϓϦΛઃܭ/ • ͳͷͰUIͷநԽ͕͖ • ϑϩϯτΤϯυ •
੩తαΠτ͔ΒSPA·Ͱ • γεςϜΞʔΩςΫτݟश͍
Α͔ͬͨ͜ͱ • νʔϜϝϯόʔ͕ComponentࢦͰ࡞ΕΔΑ ͏ʹͳͬͨ • ઃܭൣғ͕໌֬ʹͳͬͨ • SMACSSBEMΛ͋·Γߟ͑ͳͯ͘Α͘ͳͬ ͨ
ͭ·͖ͮͲ͜Ζ • நԽͷ୯Ґ • ঢ়ଶΛ࣋ͭॴ • ෳࡶ͗͢ΔΠϯλʔϑΣʔε
React Basic Theoretical Concepts (ൈਮ)
Transformation • UIσʔλ͔Βผͷσʔλܗࣜͷ୯ͳΔ ӨͰ͋Δɻ Original Data Presentational Data
Abstraction • UI࠶ར༻ՄೳͳཁૉʹநԽՄೳͰɺ͜Ε Β࣮ͷৄࡉΛ֎෦ʹ࿙ग़͠ͳ͍ɻ Component CSS Scroll Moment Timer Velocity
Composition • ෳͷUIͷநΛ߹ͯ͠ผͷநΛ࡞͢ Δɻ Card Search Bar Filterable CardList Card
State • UI୯ͳΔαʔόɾϏδωεϩδοΫͷঢ়ଶ ͷίϐʔͰͳ͍ɻ(ͷͰ࣌ʹUIͷঢ়ଶΛ࣋ ͭ͜ͱ͕ඞཁ) Original Data Presentational Data State
UserEvent
Presentational / Container Component
Presentational & Container Container Presentational Presentational Presentational Presentational Container Presentational
Presentational Component • Presentational Componentͷؔ৺͝ͱݟͨ ͷΈɻ • ΠϕϯτॲཧσʔλͷՃContainerʹ ͤΔ
Container Component • ϏδωεϩδοΫPresentational Componentؒͷ૬ޓ࡞༻Λཧ͢Δɻ • ಛʹFlux ArchitectureͰstoreΛComponent ʹඥ͚ΔׂΛ࣋ͭɻ
UIͷநԽ
UIίϯϙʔωϯτͷղ
ϩάΠϯϑΥʔϜͷ߹ • ID/Passwordೖྗ͕Ͱ͖Δ • ID/ύεϫʔυ͕8จࣈҎͷ߹Τ ϥʔΛදࣔ͢Δ • ೖྗΤϥʔ͕͋Δͱ͖ϩάΠϯϘλ ϯΛΫϦοΫͰ͖ͳ͍ •
ϩάΠϯϘλϯΛΫϦοΫ͢Δͱid/ passwordΛฦ͢ id hogehoge password ******* id must be at least 8 characters Login
σʔλߏΛߟ͑Δ id hogehoge password ********* Login ϩάΠϯϑΥʔϜ - ϢʔβID -
ύεϫʔυ
ৼΔ͍Λݟ͚ͭΔ id hogehoge password ********* Login ϩάΠϯϑΥʔϜ - ϢʔβID -
ύεϫʔυ - IDΛνΣοΫ͢Δ - ύεϫʔυΛνΣοΫ͢Δ - ϩάΠϯϘλϯΛ༗ޮʹ͢Δ - ϩάΠϯϘλϯΛແޮʹ͢Δ
ঢ়ଶΛݟ͚ͭΔ 送信不可 送信可能 検証OK 検証NG ૹ৴Մ൱ঢ়ଶ ೖྗݕূঢ়ଶ
࣮ʹམͱ͠ࠐΉ LoginForm - userId: string - password: string - onSubmit:
function - validateUserId(userId): bool - validatePassword(userId): bool - canSubmit: bool - handleSubmit(userId, password) <LoginForm userId={this.props.userId} password={this.props.password} onSubmit={this.handleSubmit} />
͏গ͠൚༻తʹ͢Δ • όϦσʔλʔΛ֎͔Βઃఆ͍ͨ͠ • ೖྗϑΟʔϧυΛ࠶ར༻Ͱ͖ΔΑ͏ʹ͍ͨ͠
ݟͨʹूத͢Δ Container LoginForm Input Input SubmitButton Validator Validator
ίϯϙʔωϯτΛׂ͢Δ LoginForm - userId: string - password: string - userIdValidator:
function - passwordValidator: function - onSubmit: function - handleSubmit(userId, password) Input - value: string - type: string - onChange: function - handleChange(value) SubmitButton - value: string - disable: bool - onClick: function - handleClick() ೖྗͱݕূؔʹΑͬͯ Ұҙʹݟ͕ܾͨ·ΔUIίϯϙʔωϯτ͕Ͱ͖Δ
·ͱΊ • UIجຊతʹσʔλͱঢ়ଶͷදݱͰ͔͠ͳ͍ • ΠϯλʔϑΣʔεϑΝʔετͰߟ͑Α͏ • ෦࣮ΛӅṭ͠Α͏ • ԼҐίϯϙʔωϯτͰ͖Δ͚ͩදࣔʹઐ೦ ͠Α͏