React, JavaScript, Technology, Programming, Productivity.
re-renders and calls the function you give it when the property changes. Before useEffect I found myself adding unnatural lifecycle methods and onPropertyChanged props because I didn’t have a way to do the property diffing outside the component: Old way: firing an event on prop change with classes