Remove unnecessary useMemo and useCallback, inspired by https://kentcdodds.com/blog/usememo-and-usecallback