SchlenkR/Vide

Generated code is huge

Opened this issue · 0 comments

Lanayx commented

I've checked Vide Fable example and found that generated code is 17x of source code, i.e. for the following 10 lines of code

let counter1 (globalState: #ICounter) =
    vide {
        div {
            let! count = ofMutable {0}
            button.onclick(fun _ ->
                count.Value <- count.Value + 1
                globalState.Counter.Value <- globalState.Counter.Value + 1
            ) { "Count" }
            $"Value={count.Value} Global1={globalState.Counter.Value}"
        }
    }

Full example
170 lines of javascript was generated, which makes it to be not very practical.