Don't understand why fullstack app does run multiple times #2452
-
Hi,
Ok, my goal is to have a fullstack app.
Now, I start it with But my issue is that the code seems to run multiple times the App component.
because the code is run twice or more ? the fullstack axum router example doesn't compile and
tells that cfg is (). So, how to do it properly ? I don't understand what I should do at this point. Thanks guys |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments
-
The project have been created using |
Beta Was this translation helpful? Give feedback.
-
Durring SSR, fullstack may run a component multiple times because of suspense. If there is a suspended future in your app (created by
The |
Beta Was this translation helpful? Give feedback.
-
@ealmloff It should not be run on the server, please find the code:
BUT: I wanted to separate some components in their own directories, which are different crates altogether. I will try to put it directly in the project and see what is going on. I will report in a few minutes. |
Beta Was this translation helpful? Give feedback.
-
@ealmloff So, regrouping everything lead to the same issue. Removing all my dependencies, and just having:
No running with when running with |
Beta Was this translation helpful? Give feedback.
-
Something is fishy. I restarted my computer and now it only print once. I will dig. |
Beta Was this translation helpful? Give feedback.
-
Found out! Chromium dev tool open leads to some unwanted reloads. So I can close this issue and keep a note for future reference. @ealmloff thanks for your help! |
Beta Was this translation helpful? Give feedback.
Found out!
Chromium dev tool open leads to some unwanted reloads.
So I can close this issue and keep a note for future reference.
@ealmloff thanks for your help!