Search code examples
reactjswebresponsive-designfrontendweb-frontend

How to display my react application as desktop view on mobile?


I know I can use media query in order to make the design responsive. but I do not want to do that now. what I would like to do is when the user load the app on mobile, my react app detects that and display the app as desktop view on mobile.


Solution

  • You can change the meta link in the index.html to display a desktop version:

    <meta name="viewport" content="width=1920">
    

    Instead of the responsive version which is:

    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    

    you will find index.html in the public folder