Skip to content

Improve error message when yield! was used but yield is needed and vice versa #4233

@forki

Description

@forki

For newcomers in elmish views it's sometimes not easy to understand when to use yield vs yield!. And the compiler is not really useful here:

let div _ _ = 1

let subView _ _ = [1; 2]



let view model dispatch =
   [
        yield! subView model dispatch
        yield! div [] []
   ]

image

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    New

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions