So I have read that you should not use useMemo hook for simple (or not expensive) calculations. I have this following example were I check whether the application is Loading or Refreshing using useMemo hook. I use this constant in many places on my render to disable buttons until the current screen does not finish loading.
const isLoadingOrRefreshing = useMemo(() => isLoading || isRefreshing, [
isLoading,
isRefreshing,
]);
What is the best approach here? For me, it does not feel right putting "isLoading || isRefreshing" multiple times in my render. I also though on using useEffect with those dependencies and then use setIsLoadingOrRefreshing inside it.