nodejsinaction
nodejsinaction copied to clipboard
Fix bind usage
Greetings,
This PR address the usage of bind in render and with listeners. bind returns a new function every time its called, so using it in render would cause performance degradation due to the creation of a new function every time and the subsequent unnecessary renders of child components Also, using it with listers causes memory leaks; as a result of creating a new function each time, the lister will not be able to remove the existing listener using the new reference.
Best Regards, Ahmed
@morozzzDima I think it's for @alexyoung as the maintainer of the repo.