Closed Merkur39 closed 6 months ago
est-ce qu'il faut corriger create-cozy-app ?
est-ce qu'il faut corriger create-cozy-app ?
Non, en tout cas aujourd'hui je ne pense pas
Total files change +11B 0%
Final result: :white_check_mark:
View report in BundleMon website ➡️
For a long time we have had problems with the app's routes opening modals. Indeed, in dev we could not refresh the app with an open modal without it being duplicated.
It is the fact of having the
createRoot
function in theinit
function of the app that causes these problems, because the latter executes twice when the app is launched via theyarn start/watch
commands.Other Cozy apps (in the same versions of React) execute this function in
setupApp
which is memoized, and thus avoids the double execution ofcreateRoot
.