Sunday, 23 April 2017

javascript detect device and render mobile view or web view

I'm using react library to render my application on client side. But I need two separate views to render.

  1. Small device width < 600px
  2. Larger device width > 600px

What is the right way to detect the browser along with its width and render the application accordingly?

I have no idea whether the server responds with a different view or it will be handled on the client side.



via Anurag Jain

No comments:

Post a Comment