```js const [user, setUser] = useState(); useEff...
# help
b
Copy code
js
const [user, setUser] = useState();
  useEffect(() => {
    setUser(supabase.auth.user());
  }, []);
Had to do this to prevent a NextJs hydration error, but now I have to refresh the page for conditional rendered components to be correct, anyone know a fix?
n
Hello @barry! This thread has been automatically created from your message in #843999948717555735 a ``few seconds ago``. Pinging @User so that they see this as well! Want to unsubscribe from this thread? Right-click the thread in Discord (or use the ... menu) and select Leave Thread to unsubscribe from future updates. Want to change the title? Use the
/title
command! We have solved your problem? Click the button below to archive it.
🆕 NextJs hydration error causes another conditional rendering conflict
b
Originally I just had
const user = supabase.auth.user()
, but since logging out doesn't cause a re-render it caused a hydration error cause of a conditional render
having a usercontext would probably fix this, but any other ideas?
ok my mind is blown if i deploy the app there is no conditional rendering issues or anything
n
Thread was archived by @barry. Anyone can send a message to unarchive it.
NextJs hydration error causes another conditional rendering conflict