Search code examples
f#elmish-wpf

In the new Elmish.WPF 4.0 beta version, where is runWindowWithConfig?


I've been playing with the new beta version of Elmish.WPF 4.0 and can't seem to find Program.runWindowWithConfig. Has it been replaced?

let entryPoint (_: string[], mainWindow: Window) =
        Program.mkProgram init update bindings
        |> Program.runWindowWithConfig
            { ElmConfig.Default with LogTrace = true; Measure = true; MeasureLimitMs = 1 }
            mainWindow

TIA


Solution

  • Yes, it has been replaced. I replaced it with a setting function on WpfProgram for each field of the config. This design allows adding a new value to configure in a backwards compatible manner. See a sample.