khalidabuhakmeh,
@khalidabuhakmeh@mastodon.social avatar

This a question I have for users ( @alexzeitler and @egil) who are attempting to reduce repetition with components.

Do you think less components and more reusability is better, or are you losing some benefits of breaking down the UI into optimized functions?

I thought about this building my JetBrains store sample, too. I'm unsure where to draw the line of reuse vs. bespoke endpoints.

egil,
@egil@mastodon.social avatar

@khalidabuhakmeh @alexzeitler currently I lean towards:

  • If something can be a component that makes sense on its own, then, by all means, make it that. Then you can decide if it's a routable component or just a component that's used by other components.
  • If something only makes sense in the context of a component, but you still want to update it individually, then leveraging the template fragment pattern makes sense.

More detail in my answers here: https://github.com/egil/Htmxor/discussions/39

alexzeitler, (edited )
@alexzeitler@mastodon.social avatar

@khalidabuhakmeh @egil To be honest I'm still trying to find a good mixture.

Building blocks like inputs seem most obvious but as there a so much use cases you have to bake in a ton of use cases which make it a huge effort to maintain.

Components for specific use cases are much easier to maintain but due to their specific usage aside from readability of code there's not much advantage imho.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • GTA5RPClips
  • DreamBathrooms
  • InstantRegret
  • magazineikmin
  • thenastyranch
  • ngwrru68w68
  • Youngstown
  • everett
  • slotface
  • rosin
  • ethstaker
  • Durango
  • kavyap
  • cubers
  • provamag3
  • modclub
  • mdbf
  • khanakhh
  • vwfavf
  • osvaldo12
  • cisconetworking
  • tester
  • Leos
  • tacticalgear
  • anitta
  • normalnudes
  • megavids
  • JUstTest
  • All magazines