Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Decoupling UI components for better reusability...

Sponsored · Ship Features Fearlessly Turn features on and off without deploys. Used by thousands of Ruby developers. →

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

Transcript

26 slides
  1. • Component segmentation for reusability • Problems we encounter when

    implementing a new component • The solution that we test a new component by storybook Agenda
  2. • Action by click or typing • Integrate API •

    Integrate stores What do we do on the page
  3. • Handle action event • Call API • Manage data

    from API • Re-render view
 when data changed Spaghetti man Button Button Button Contents Button
  4. 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
  5. 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
  6. Key takeaways > Making components easily reusable > Storybook helps

    reduce the time spent on testing and reviewing > Let’s have fun with the storybook

More Decks by LINE Developers Thailand

Other Decks in Technology