Hey Aislan,

Max's point of avoiding unnecessary components is a good one, but it 
depends on what scale of app/architecture you're talking about.

When you're building building smaller types of UI components, it's a good 
rule to get you started. For example, let's say you want to build something 
simple like an html form in elm. You may want some input fields, select 
boxes, error messages, and maybe a custom submit button (whatever that is). 
This can likely be built within a single TEA component, without the need to 
create any additional subcomponents. Creating subcomponents for individual 
inputs, or special buttons, etc will likely be an unnecessary abstraction 
that will only make your code harder to understand, and harder to maintain. 
On the small scale, just avoid unnecessary componentization and you'll be 
fine.

When you're building something at a larger scale like a single page app, 
that contains various layouts, menus, &  pages - which contain several 
components per page - you'll need components to keep your code organized, 
maintainable, and easy to understand. 

The inter-component communication method that I posted at the top of this 
thread is likely only useful in a large app, where there's a need for app 
wide communication. Using this method for small scale parent-child 
communication probably overkill.




On Thursday, July 21, 2016 at 12:41:09 PM UTC-4, Aislan de Sousa Maia wrote:
>
> Hello guys! I'm a kind of noob with all of this. Can you explain a little 
> more the concern regarding componentization? Some examples could be great. 
>
> Thanks for all!
>

-- 
You received this message because you are subscribed to the Google Groups "Elm 
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to