https://dev.to/childrentime/react-hooks-performance-how-to-avoid-unnecessary-re-renders-2483