Hello.
This is app/admin/page.tsx:
'use client'
import { useEffect, useState } from 'react'
import { Application } from '@/app/admin/components'
export default () => {
const [isClient, setIsClient] = useState<boolean>(false)
useEffect(() => {
setIsClient(true)
})
console.log('admin page', isClient)
if (!isClient) {
return null
}
return <Application />
}
I'm trying to render the Application component (React Admin) only on the browser.
I'm getting one console.log on the server where isClient is false and no console.log's in the browser. Why is that?