-
Notifications
You must be signed in to change notification settings - Fork 13
Description
I am testing with the Fable.LitRouter and LitState but it requires 1.4.2, I get compilation error if I get 1.4.2 but if I downgrade to 1.4.1 then there's no error. This is just showing in Jetbrain's Rider. If I compile with npm run start then there's no error.
Looking at the commit history/release notes there shouldn't be anything that should affect this in 1.4.2.
Looking at the release notes there shouldn't be any impact on the Elmish/Lit libs.
For reference this is the sample code that I tried and updating new variables to make it minimal
let initialState1() =
let monitorPageModel, monitorPageMsg = ListMonitorsPage.init()
let welcomePageModel, welcomePageMsg = WelcomePage.init()
let model = { CurrentPage = Anonymous AnonymousPage.Welcome; ServerMessage = []; MonitorModel = monitorPageModel; WelcomePageModel = welcomePageModel }
model, Cmd.none
let update1 msg model =
model, Cmd.none
let view1 model dispatch =
html $"""
<div>Hello world</div>
"""
Program.mkProgram initialState update view
|> Program.withLit "my-app"
|> Program.withBridgeConfig (Bridge.endpoint socketEndpoint |> Bridge.withMapping ServerMsg)
|> Program.run
Update:
Looks like something in these two packages are causing the compiler to get confused.
<PackageReference Include="Fable.LitRouter" Version="1.0.0-beta-005" />
<PackageReference Include="Fable.LitStore" Version="1.0.0-beta-001" />
If I remove that and just keep Lit to 1.4.2 it has no compile error
I've narrowed it down. It's the Fable.LitRouter that's causing an issue. Not sure where the source code for LitRouter is?
I extracted the library and I don't get any errors, so not sure why this is happening?
I removed the Fable.LitRouter and just created a separate fs file from https://nuget.info/packages/Fable.LitRouter/1.0.0-beta-005 Maybe @JordanMarr knows?


