After reading Josh Adams Time tracker SPA example something really clicked for
me, and I feel I really "get it" now.
I did not know what I needed and how to ask for it, but this was extremely
helpful, and got me back on track!
Also, I think my OP about the counters can be considered closed now.
Josh, this is great! Thanks for this idea
Textfield.onInput <| ProjectMsg' << SetNewProjectName
On Monday, August 29, 2016 at 11:03:12 PM UTC+3, Josh Adams wrote:
>
> Here's what I've been working on. The recent git history is all about
> refactoring. Haven't introduced 'sub-components with
>
> @Erik Lott, did you mean:
> view : Msg -> Msg -> Int -> Html Msg
> Or did I miss something?
Yeah, just a typo. Thanks for catching that.
On Tuesday, August 30, 2016 at 5:27:06 AM UTC-4, Wouter In t Velt wrote:
>
> @Erik Lott, did you mean:
>
> view : Msg -> Msg -> Int -> Html Msg
@Erik Lott, did you mean:
view : Msg -> Msg -> Int -> Html Msg
Or did I miss something?
@Peter Damoc, yeah the flat solution would be simpler (I actually did do a flat
counter list before separating out the CounterView ;).
--
You received this message because you are subscribed to the
Wouter, looks good. Yeah, it's not a big deal if the counter is nested or
not in this case. Just one thought - I'm not sure that the generic
signature of the CounterView.view is useful here:
view : msg -> msg -> Int -> Html msg
Yes, keeping the signature generic allows you to avoid importing
>
> Here's what I've been working on. The recent git history is all about
> refactoring. Haven't introduced 'sub-components with state' or w/e and
> don't see it coming soon. It's an Elm-SPA with a Phoenix backend:
> https://github.com/knewter/time-tracker
Josh, make sure to share this
>
> Here's what I've been working on. The recent git history is all about
> refactoring. Haven't introduced 'sub-components with state' or w/e and
> don't see it coming soon. It's an Elm-SPA with a Phoenix backend:
> https://github.com/knewter/time-tracker
>
Looks interesting. Thanks for
>
> I would love to know how to do this!
> Can anyone point me to a brain-dead-simple practical and working example
> for a non-expert Elm user like myself?
OK, so here is my take at an alternative multiple counters approach.
{- Model needs to hold a list of counter values
Any counter in the
>
> I would love to know how to do this!
> Can anyone point me to a brain-dead-simple practical and working example
> for a non-expert Elm user like myself?
OK, so here is my take at an alternative multiple counters approach.
import Html exposing (Html, div, button, text)
import Html.App
>
> I would love to know how to do this!
> Can anyone point me to a brain-dead-simple practical and working example
> for a non-expert Elm user like myself?
OK, so here is my take at an alternative multiple counters approach.
First, putting everything in one (monolithic) module:
import Html
>
> I would love to know how to do this!
> Can anyone point me to a brain-dead-simple practical and working example
> for a non-expert Elm user like myself?
OK, so here is my take at an alternative multiple counters approach.
First, putting everything in one (monolithic) module:
import Html
>
>
> For newcomers to Elm, *wouldn't it be better to change the scaling from 1
> to multiple counters in the guide in a different way? *
> E.g.
>
>1. Build everything in 1 module, e.g. save a copy of counter.elm as
>counter-list.elm
>2. Change every building block (Model, Msg,
>
> It's like I keep falling whenever I try to ride this new elm-bike.
> And I keep hearing from others that they just get up and go and don't fall,
> so I should also just go and don't fall, or be very specific at which
> point in my process I fall off my bike.
> (Sorry if the analogy is
One thing that might help in a Thinking in Elm context would be to put more
emphasis on hierarchical model construction and hierarchical view construction
as separate ideas. The latter is mostly about breaking things down via
functions. The former is about defining data types and functions on
Thanks for the feedback folks. Really helpful and got me thinking. Will
definitely dive into the links @NickH shared.
And @ErikLott's example of a multi-page SPA (forgive the oxymoron) was also
helpful. This is one of the places I run into issues: my top level update
is already huge and
Folks, Elm scales just fine. We're at the tail-end of a large SPA front-end
build in Elm... lots of complexity, and it's been wonderful.
The counter examples, sortable table, and autocomplete are fine examples of
how to modularize elm code. They don't lead you down the wrong path, nor do
they
On Sunday, August 28, 2016 at 7:02:04 AM UTC-4, Wouter In t Velt wrote:
>
>
>- Forget about about "components": the term is very confusing, means
>very different things in different contexts.
>- Start to build with 1 Model, 1 Msg, 1 update, 1 view
>- As soon as one these becomes
Hi
On Sunday, August 28, 2016 at 2:02:04 PM UTC+3, Wouter In t Velt wrote:
>
> Something I have been struggling with for quite some time (coming from
> React and Flux) is how to scale. There are various posts on this forum
> related to the topic, e.g. Design of large elm apps
>
My take on it is - the standard "counter" examples are used not just in Elm
but in lots of virtual-dom-based frameworks, I used to hate them as well
but now I see their usefulness as a "Short, Self Contained, Correct
Example" in which the domain has been reduced to the bare minimum. And I
have
19 matches
Mail list logo