Moataz Mohammady
Posted on February 16, 2020
last week my machine start hanging while I'm developing react app.
I thought this happening because :-
1) I'm using PHPSTORM (for the back end) and webstorm (for frontend) so I restarted my machine and didn't open any of those IDEs and started the application via chrome / Firefox but also freezed.
2) My coworker asked me to install https://www.npmjs.com/package/gtop and check the processes, also we checked the pc cooling system but also freezed.
3) I disabled all chrome extensions using this extension https://chrome.google.com/webstore/detail/disable-extensions-tempor/lcfdefmogcogicollfebhgjiiakbjdje but also freezed.
Today (first work day)
3) I write down this script https://gist.github.com/MoatazAbdAlmageed/10af8fb6e587dcd9b2039fd8f4ff1c85 to kill chrome if available memory less than 1GB and when I start developing I found chrome hanging and closed when I pressed a button
Finally I noticed that I typed bad reducer behavior that made like an infinity loop :) that's it
I think this can help in cases like this https://github.com/facebook/react/issues/5375
Posted on February 16, 2020
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.