Component use cases

Hi there,

I am curious for which you all use components in Weweb.

I am thinking about some use cases, but eventually these are in the end very specific like a tabel with pagination, or a form. In the end I want to change the fields/columns used. A card component for a menu component are the ones I am currently thinking about.

So if you can share or describe some examples that would be great. Thanks

I use components in two ways:

  1. Reusable logic - when you need some element that appears on multiple pages and always have the same logic and the input can be defined with props
  2. Simplify Layout of the page by making bigger layout items in the page components without too much logic - these don’t have to be used on multiple pages, I use them only to simplify the element tree
3 Likes

Can I make a component of a form that I want to use for a page to create a record and for a page to edit the record? Or isn’t that a good use case for components

Yup. I’ve done this.