Should I disable T3 eslint rule: no-floating-promises? Issues with React....
The typical model for fetching data, or doing anything asynchronous inside useEffect, does always triggers this rule,
Here's my code (with the rule disabled for the line):
Inside the useEffect, I need to route users to /login, this is an asynchronous function. The only way to bypass the error I've found is to disable to rule.
5 Replies
Not that supabase.auth.onAuthStateChange does not accept promises as the callback
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
I noticed I could bypass it by adding .then().catch() to it (and handling errors or whatever inside).
I think that's a good way to bypass it
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
the same things happens to me when using "signIn" from nextauth;