import { useEffect } from 'react';
 
export default function ClientComponent() {
  useEffect(() => {
    // You now have access to `window`
    console.log(window.innerHeight);
  }, [])
 
  return ...;
}
Unsupported Features
After enabling the static export output mode, all routes inside app are opted-into the following Route Segment Config: export const dynamic = 'error'With this configuration, your application will produce an error if you try to use server functions like headers or cookies, since there is no runtime server. This ensures local development matches the same behavior as a static export. If you need to use server functions, you cannot use a static export.The following additional dynamic features are not supported with a static export:
rewrites in next.config.js
redirects in next.config.js
headers in next.config.js
Middleware
Incremental Static Regeneration
Deploying