I don’t know if this is standard behaviour, but when I use the ‘forge tunnel’ command and check on my app, the logs inside of the main ‘const App = ()’ function show it has ran 6-7 times consecutively, although the outside functions called inside tell otherwise. Is this a visual bug?
My app is tested on the Forge CLI version 7.0.3
Hey @DanielVelkov,
There are several reasons why your app code might be re-running. For example, it could be because something is triggering the app to re-render such as a hook (you can learn about hooks at A Deeper Look at Hooks in Forge - Atlassian Developer Blog).
I hope this helps - if you’re still unsure of what’s going on, could you share a little bit more about what your app is doing?
Cheers!
Mel
I found out it was the hooks that I set using useState that caused this.
I know this has been a while, but could you share more specifics about what the problem/solution were?
@KeithHamburg it sounds as though it was related to the way React triggers re-renders when state changes.
If you’re experiencing something similar I would recommend creating a new post - since this one is marked as solved, with a little more about what you’re seeing happen in your app vs what you were expecting.
Cheers!
Mel