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
Decoupling UI components for better reusability...
Search
LINE Developers Thailand
October 25, 2024
Technology
0
53
Decoupling UI components for better reusability and test with Storybook
Decoupling UI components for better reusability and test with Storybook
LINE Developers Thailand
October 25, 2024
Tweet
Share
More Decks by LINE Developers Thailand
See All by LINE Developers Thailand
LINE API Deep Dive Q1 2025: Unlocking New Possibilities
linedevth
1
200
Welcome & Tech Vision Keynote
linedevth
0
180
Building the Future: LINE API Updates in 2024
linedevth
1
170
Revolutionizing Telepharmacy with The POWER of Gen AI and LINE API
linedevth
0
180
Seamless Inventory Management with ChatGPT and LINE SHOPPING API
linedevth
0
120
The Future of LINE Retail Chatbot using Gemini AI
linedevth
0
290
Domain Data Platform for Scalable Data Management
linedevth
0
110
Building a Fortune Teller App with OpenAI From Chatbot to Voice Assistant
linedevth
0
95
B.A.A.S - BeTask AI and Automation for SMEs
linedevth
0
86
Other Decks in Technology
See All in Technology
TerraformをSaaSで使うとAzureの運用がこんなに楽ちん!HCP Terraformって何?
mnakabayashi
0
300
Observability в PHP без боли. Олег Мифле, тимлид Altenar
lamodatech
0
270
Liquid Glass革新とSwiftUI/UIKit進化
fumiyasac0921
0
120
JSX - 歴史を振り返り、⾯⽩がって、エモくなろう
pal4de
3
1.1k
実践! AIエージェント導入記
1mono2prod
0
130
キャディでのApache Iceberg, Trino採用事例 -Apache Iceberg and Trino Usecase in CADDi--
caddi_eng
0
170
AIのAIによるAIのための出力評価と改善
chocoyama
0
480
Workflows から Agents へ ~ 生成 AI アプリの成長過程とアプローチ~
belongadmin
3
170
IIWレポートからみるID業界で話題のMCP
fujie
0
710
Claude Code Actionを使ったコード品質改善の取り組み
potix2
PRO
2
1.3k
ユーザーのプロフィールデータを活用した推薦精度向上の取り組み
yudai00
0
470
活きてなかったデータを活かしてみた話 / Shirokane Kougyou vol 19
sansan_randd
1
410
Featured
See All Featured
We Have a Design System, Now What?
morganepeng
52
7.6k
Unsuck your backbone
ammeep
671
58k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
50k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
Making Projects Easy
brettharned
116
6.2k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
31
1.2k
Typedesign – Prime Four
hannesfritz
42
2.7k
Writing Fast Ruby
sferik
628
61k
Why Our Code Smells
bkeepers
PRO
337
57k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
29
1.8k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
The Art of Programming - Codeland 2020
erikaheidi
54
13k
Transcript
Decoupling UI components for better reusability and test with Storybook
Frontend world
UI Frameworks
TEST
• Component segmentation for reusability • Problems we encounter when
implementing a new component • The solution that we test a new component by storybook Agenda
• Action by click or typing • Integrate API •
Integrate stores What do we do on the page
• Handle action event • Call API • Manage data
from API • Re-render view when data changed Spaghetti man Button Button Button Contents Button
Component segmentation for reusability
Input Type 1 Input Type 2 Input Type 3
None
Panel for 5 Button and Content Button Button Contents Label
Button Button Button • Render component • Action by clicked button Focus • Integrate with API • Mutate data Out of scope
Overview Button Button Contents Panel 1 Button Button Button Panel
3 Button Button Button Panel 2 Button Button Button Button Button Contents Panel 4 Button Button Button Container Container • Listen event from each panel to handle action • Action to call API • Action to stores
Problems we encounter when implementing a new component
Test and review
How do we test > Unit test in each component
> Automation test
Issues we often encounter during reviews
A lot of files changed
None
None
The solution that we test a new component by storybook
None
Storybook
None
Reviewer Create PR
Key takeaways > Making components easily reusable > Storybook helps
reduce the time spent on testing and reviewing > Let’s have fun with the storybook
None