Interactive web app with Bonito and WGLMakie

I am trying to build an interactive app with WGLMakie und Bonito and just cannot figure it out. I got as far as the following code that works sometimes:

using Bonito
using WGLMakie

app = App() do
    slider = Bonito.Slider(1:100)
    fig = Observable(scatter(1:slider.value[], 1:slider.value[]))
    on(slider) do s
        fig[] = scatter(1:s, 1:s)
    page = DOM.div(
        Labeled(slider, slider.value),
    return page

it works sometimes because the app “resets” quite frequently and the browser console shows an error (among others)

removing WGL context, canvas is not in the DOM anymore!

and Julia prints out a JavaScript error

An exception was thrown in JS: TypeError: canvas is null

also the js"""console.log(...)""" simply does nothing.