New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some content double rendering in the browser #912
Comments
What do you mean with "render twice"? Is "Render()" called twice or are you nodes in the DOM rendered "twice" and how do you know that? Edit: Actually I wonder if you mean that the delievered page gets updated in the frontend, which what Go-App is for. You don't use it for rendering stuff "server side" for being shown in the frontend. This is merely for visitors that do now start the go-app framework (like webscrapers). |
It looks like you do something wrong in the component that is rendering this page. The main is okay as is. |
I simply can't see it, here is the indexPage.go.
|
Well, I do not immediatly see a problem there. Did you check what elements are getting created in the browser? P.S.: Placing the |
Are you on a stable branch?, it look like something i got while working on v10. |
I am on github.com/maxence-charriere/go-app/v9 v9.8.0 // indirect. So not on v10 or a non-stable branch AFAIK. |
@oderwat That is the weird part that I forgot to call out. While it is rendered in the browser twice, the HTML in the dev console shows only once instance and what should be the valid HTML. |
Did you try it without the css? |
I did try without CSS. When I commented out this line in main.go: "app.RunWhenOnBrowser()" it stopped double rendering and works fine. |
This can't be the solution. If that line is missing, there is no frontend, and it will only show the pre-render version of the page (AFAIK). You do compile the executable and the WASM code separately, right? Maybe you want to try out some other code to have some references: https://github.com/metatexx/go-app-todo P.S.: Have you tried to leave out the |
Yes, I did move that to the proper place and out of the body. And yeah, the whole point is to have the frontend load. Thank you for the links. |
I have everything working with the framework fine, except some of the content renders twice on the web page. I am not attempting to render twice, AFAIK, so thinking this could be related to something deeper in the framework and related libraries used. Has anyone seen this and/or have a recommendation?
The text was updated successfully, but these errors were encountered: