I'm working on an application that has several forms, one for getting the 
user credential and some other to let the user insert some data.

Having forms in multiple pages is somehow more difficult than it should 
because of two known issues, both described 
here https://github.com/elm-lang/html/issues/105:

   - onInput and value don't interact well with each other, causing the 
   cursor to jump around
   - the virtual dom reuses forms component, making some values I entered 
   in one form leak into another

What is the recommended way of doing this?

My preference would be to always set value 
<http://package.elm-lang.org/packages/elm-lang/html/2.0.0/Html-Attributes#value>
 to 
match what I have in the model. This would be clean and easy to understand 
but I'm not sure how safe it's to use it. The last thing I want is some 
clean code that has UX issues.

I could work around the virtual dom issues by abusing Html.Keyed, but that 
feels like an hack. And it would require even more hackery to make sure 
that I can reuse the same from multiple times.

Thanks,
Mario

-- 
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