import { useEffect, useState } from 'react' const foo = (query) => query export const FOO = foo('query') const MyPage = () => { const [isMounted, setMounted] = useState(false) useEffect(() => { setMounted(true) }, []) if (isMounted) { return
client loaded
} returnserver
} const getServerSideProps = async () => { return { props: {} } } export default MyPage export { getServerSideProps }