---
title: "Discussion on \"react nextjs isMobile on statically generated pages\" | Hashnode"
description: "Discussion on \"react nextjs isMobile on statically generated pages\". most solutions you'll find for determining whether a user is viewing your web app on mobile will not work on statically generated pages\nthis is the cleanest solution i could come up with\nconst [isMobile, setIsMobile] = React.useState<number>(false);\n..."
url: "https://hashnode.com/posts/react-nextjs-ismobile-on-statically-generated-pages/649e29b6b429d991246cde17"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [react nextjs isMobile on statically generated pages](https://codetiger.hashnode.dev/react-nextjs-ismobile-on-statically-generated-pages?utm_source=hashnode&utm_medium=feed)

most solutions you'll find for determining whether a user is viewing your web app on mobile will not work on statically generated pages this is the cleanest solution i could come up with const \[isMobile, setIsMobile\] = React.useState<number>(false); ...

Jun 30, 2023 · 1 min read · codetiger.hashnode.dev  
Read the article

-   [#nextjs](https://hashnode.com/tag/nextjs)
-   [#static-site-generation](https://hashnode.com/tag/static-site-generation)
-   [#responsive-web-design](https://hashnode.com/tag/responsive-web-design)

## Written by

[Mir N. Ali](https://hashnode.com/@codetiger)

@codetiger · Princeton, NJ

  
[View profile](https://hashnode.com/@codetiger)

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
