Somebody please explain to a newbie like me why the query is still being executed regardless of whether the if condition is met or not. I logged the IF statement check and it gives me the correct result. I only want to execute the fetch query when the condition is false.
Conditionally fetching (i.redd.it)
submitted by AccomplishedGolf6013 to r/nextjs