Mentioning again. You didn't refactor the entire architectural issue. You just updated stuff that didn't were affecting my code, for example, the saving on closing, its super easier, on closing, update, that's it, no timing out, no nothing, but you decided that that was causing issues. What's causing issues you architectural problem that you're trying to avoid, Keep saying to you that is an architectural problem, this means that the way your nesting files, states, everything it has an architectural issue that everything causes tree remounting or rerenderings causing lag, too much lag, so is not something that you can just patch by memoizing, or removing features to aovid that, your issue is architectural, is the yway you've nested stuff that re-renderes in a chain in a way that breaks everything, memory leaks, because eveyrthing keeps re rendering or remounting infinitely even if you already stopped typing.