Closed iammohan01 closed 1 month ago
Interesting! can you please provide steps to reproduce with your system details. I don't see this on my machine (PopOs 22.4)
Machine : MacBook Pro M1 Version : 14.6.1
Docker engine: colima -> changed property in rust code since i'm not using docker desktop, so that my docker.sock it at different location.
Reproduce steps:
there is no reproduce steps, by default it renders infinity, just use console.log in that component.
How i found is : render glitch, then only i looked inside. and found this.
macOs/windows both doesn't support network mode host
, -> linux docker engine uses it by default.
So that i have to manually assign/forward ports in docker,
so this port forwarding gets rendering again and again.
The fix is just remove containers
from dep array.
if you want i can make a PR for this.
@iammohan01 yeah please go ahead.
@iammohan01 one problem with that solution is if I stop/start container then it won't refresh the container list so stale data will be present until unless you force it by going to some other screen and back or reload off course.
When rendering ContainersList on app start,
loadContainers
function has been getting called withcontainers
as a dependency,this is causing infinite re-render,
what i found is
loadContainers
callssetContainers
inContainerContext
.this is the reason for infinite re-render IG.