Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

useEffect useState changes

Ollie Halliday32fbe0222817
diff --git a/apps/temp-docs/docs/guides/with-ionic-react.mdx b/apps/temp-docs/docs/guides/with-ionic-react.mdx
index 7ca3cb9ced7..b216f4d31d9 100644
--- a/apps/temp-docs/docs/guides/with-ionic-react.mdx
+++ b/apps/temp-docs/docs/guides/with-ionic-react.mdx
@@ -316,13 +316,13 @@ import { Session } from '@supabase/supabase-js'
setupIonicReact()
const App: React.FC = () => {
- const [session, setSession] = (useState < Session) | (null > null)
+ const [session, setSession] = useState<Session>(null)
useEffect(() => {
- setSession(supabase.auth.session())
+ setSession(supabase.auth.session())
supabase.auth.onAuthStateChange((_event, session) => {
setSession(session)
})
- }, [session])
+ }, [])
return (
<IonApp>
<IonReactRouter>