I've used the mentioned "workaround" with Html.Keyed several times, and we also use that approach on several pages at NoRedInk.
To summarize: the approach I'd personally use is the same that zwilias suggests and shared an example of in the comments of the issue mentioned previously:
https://ellie-app.com/3fPSxX6VHK7a1/0
view model =
...
, Html.Keyed.node "div"
[ ( toString model.generation ++ "-name"
, Html.input [ Html.Attributes.defaultValue
model.name ] []
)
]
, Html.button [ Html.Events.onClick Submit ] [ Html.text "Submit" ]
...
update msg model =
case msg of
ChangeName newName ->
{ model | name = newName }
Submit ->
{ model | generation = model.generation + 1, name = "" }