I would generally move the function definition out of the view for performance reasons, as it gets redefined on every render in your example.
On Wednesday, June 1, 2016 at 10:21:21 AM UTC+2, Юрий Яковенко wrote: > > I've add myLabel function to avoid repeating of template code, just wanted > to ask, is correct way to do this? > > > вт, 31 мая 2016 г. в 20:49, Gage Peterson <[email protected] <javascript:> > >: > >> I've just tried running your code file and it seems to work. Were you >> trying to accomplish something specific? >> >> -- >> You received this message because you are subscribed to a topic in the >> Google Groups "Elm Discuss" group. >> To unsubscribe from this topic, visit >> https://groups.google.com/d/topic/elm-discuss/G9YeVjeBRAE/unsubscribe. >> To unsubscribe from this group and all its topics, send an email to >> [email protected] <javascript:>. >> For more options, visit https://groups.google.com/d/optout. >> > -- 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.
