GenieFramework / Stipple.jl

The reactive UI library for interactive data applications with pure Julia.
MIT License
324 stars 27 forks source link

importing the named apps from a module breaks rendering #284

Open hhaensel opened 4 months ago

hhaensel commented 4 months ago
module MyAppModule

@app MyApp begin
end

ui() = "Hello World"
@page("/", ui, app = MyApp)

end

up()
# at this point the app loads correctly
import .MyAppModule.MyApp
# at this point the app doesn't load anymore

The reason is that after importing the mount point's name is no longer prefixed by the module name, so the following error is displayed in the browser's console

Failed to mount app: mount target selector "#Main_MyAppModule_MyApp" returned null.

Instead, the name MyApp references the correct div.