Hi,
First of all, thank you for everything. I love Gleam and Lustre. It makes me enjoy web programming more than ever!
I have some design questions about components. I want to create a reusable component that handles a search with autocomplete. The user write a few letters and can choose from a list of rows. I am still learning how to define criteria to evaluate whether it's a good case for a component. This is my first question. Is this set of behaviors a good case? If yes (or no), what criteria do you use to answer? One of the criteria I read in the doc is whether the update function is complex or not. Is there any other criteria?
The other question is whether to let the component handle the fetch effect. I would like to register the component with a function that returns an effect with a message defined by the component. This would take an array of the type List(#(id: String, entry: String)). When the user clicks on the list, the component emits the ID.
As John Ousterhout would say, programming is a problem of where to draw boundaries between modules in a program. I think we learn better by sharing experiences and criteria.
Thanks again!