We have over 36,000 lines of production Elm code that we've been running 
over a year. Before that we had a ton of React code, although Elm has since 
overtaken it in terms of LoC.
 

> Since I'm comfortable with React way to componentization, I can't 
> understand why " *flat is better than nested*. " while getting big update 
> and view functions.
>
These huge files won't hurt the maintainability (and reusability) of the 
> project ? Someone can expand in this area ? 
>

If the files feel too big, split them into separate files and import them. 
That's not a big deal.

What is a big deal, and a super common beginner mistake, is to split out 
separate state ownership when you don't need to yet.

Our React code base is full of components that each have their own local 
state, because that's what React encourages.

Our Elm code base has very, very few components with their own local state. 
In most cases each "page" has its own state and state is not subdivided any 
further than that.

As far as maintainability goes, it's not remotely close. It's not just that 
Elm code is more maintainable, it's that it is on a different planet of 
maintainability. The gap between Elm and React is bigger than the gap 
between React and MooTools.

tl;dr I wouldn't worry about it. :)

-- 
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 elm-discuss+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to