It finally happened. I have been looking up to my mentor for some time. For good reason, he is a very intelligent and wise mentor.
There have been refactorings or changes made to his code before. Obviously working on this legacy code that we do we have to make changes constantly.
This is the first time I have had to make changes because I could make it better!
This is like when I play golf and I drive the ball it further than my friend, who happens to be very talented at the sport. It rarely happens, but when it does I let it be known!
I am not sure If I can display the code below. But basically There was an entire doc listener for a small draggable component. Because of this everytime someone clicked the document,
it would rerender lots of parts of the page.
Now that I moved the doc listener to just the button, the page no longer re-renders after every click!
A small but effective change!
Best,
Merl