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

Reusability: Sharing components with joy

Reusability: Sharing components with joy

Slides for my talk at ReactiveConf 2018 in Prague, Czech Republic.

Summary:
Reusability is often listed as one of the core benefits of component-based architectures. While in theory, it’s pretty straight-forward, in practice, writing truly reusable components is way more complicated. How do we customize styling? how to render to non-browser environments?
But, following some rules and patterns can help to minify the problems. Follow me along my quest to achieve maximal reusability and delightful component sharing.

Robin Frischmann

October 29, 2018
Tweet

More Decks by Robin Frischmann

Other Decks in Programming

Transcript

  1. Presentational Logical Business Logic
 Behaviour Styling Markup stateless receive data

    as props often render children no dependencies stateful manage data & updates render presentational dependencies
  2. :hover :active :disabled primary secondary Click me Click me Click

    me Click me Click me Click me Click me Click me Click me Click me Click me Click me 1
  3. Responsive Styling width min-width: 320px min-width: 640px min-width: 1024px width

    width titleWidth titleWidth titleWidth imageWidth imageWidth imageWidth descriptionWidth descriptionWidth descriptionWidth 1
  4. 1

  5. takes Github username calls the Github API fetches a list

    of repositories sorts them by stars renders some cards 2
  6. 2

  7. 2

  8. 2

  9. 2

  10. takes Github username calls the Github API fetches a list

    of repositories sorts them by stars renders some cards renders some cards 2
  11. 2

  12. 2

  13. 2

  14. 2

  15. 2

  16. 2

  17. 2

  18. 2

  19. My Addresses Hauptstraße 25 76131 Karlsruhe Germany Teststraße 220 76139

    Karlsruhe Germany 12 John Doe Avenue Somewhere, Auckland United States Remove Remove Add Address Edit Edit Edit Remove 2
  20. 2

  21. 2

  22. 2

  23. Summary ✓ Design Systems & 
 Theming ✓ Composition over

    Configuration Reusing Presentation Reusing Logic ✓ Headless Components ✓ CRUD Components ✓ React Hooks