Open
Description
Installer Version
3.4.1
Describe the bug
On the Modal component onVersionChanged() function seems to be unnecessarily called once every render. This issue was flagged in a comment a while ago: #458
Expected behavior
I assume this function should be called only once when the application is updated.
Steps to reproduce
Just launch the installer. To make it easier to see we can add a console.log() within the onVersionChanged function declaration. Whenever the application component renders this function gets called.
References (optional)
Additional info (optional)
This seems to happen because the function is being called directly in the render method. We could use a useEffect to make sure the function only gets called when necessary and we could also use a useCallback hook to prevent the function from being redeclared unnecessarily as well.
Discord Username (optional)
broax5707