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
40
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
Welcome & Tech Vision Keynote
linedevth
0
120
Building the Future: LINE API Updates in 2024
linedevth
0
120
Revolutionizing Telepharmacy with The POWER of Gen AI and LINE API
linedevth
0
140
Seamless Inventory Management with ChatGPT and LINE SHOPPING API
linedevth
0
89
The Future of LINE Retail Chatbot using Gemini AI
linedevth
0
200
Domain Data Platform for Scalable Data Management
linedevth
0
67
Building a Fortune Teller App with OpenAI From Chatbot to Voice Assistant
linedevth
0
63
B.A.A.S - BeTask AI and Automation for SMEs
linedevth
0
61
Boosting Development Quality through Continuous Documentation Integration
linedevth
0
84
Other Decks in Technology
See All in Technology
データ基盤におけるIaCの重要性とその運用
mtpooh
4
440
FODにおけるホーム画面編成のレコメンド
watarukudo
PRO
2
260
.NET AspireでAzure Functionsやクラウドリソースを統合する
tsubakimoto_s
0
180
iPadOS18でフローティングタブバーを解除してみた
sansantech
PRO
1
130
月間60万ユーザーを抱える 個人開発サービス「Walica」の 技術スタック変遷
miyachin
1
130
EMConf JP の楽しみ方 / How to enjoy EMConf JP
pauli
2
150
三菱電機で社内コミュニティを立ち上げた話
kurebayashi
1
350
Git scrapingで始める継続的なデータ追跡 / Git Scraping
ohbarye
5
480
Docker Desktop で Docker を始めよう
zembutsu
PRO
0
150
RubyでKubernetesプログラミング
sat
PRO
4
160
Alignment and Autonomy in Cybozu - 300人の開発組織でアラインメントと自律性を両立させるアジャイルな組織運営 / RSGT2025
ama_ch
1
2.3k
Goで実践するBFP
hiroyaterui
1
120
Featured
See All Featured
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
3
360
Code Review Best Practice
trishagee
65
17k
Building a Modern Day E-commerce SEO Strategy
aleyda
38
7k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
3
180
Writing Fast Ruby
sferik
628
61k
[RailsConf 2023] Rails as a piece of cake
palkan
53
5.1k
Building Better People: How to give real-time feedback that sticks.
wjessup
366
19k
Build The Right Thing And Hit Your Dates
maggiecrowley
33
2.5k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
10
860
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
33
2.7k
Being A Developer After 40
akosma
89
590k
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