Answer the question
In order to leave comments, you need to log in
How to determine device type in react?
You need to execute a certain code if a person accessed the site from a mobile phone.
What solution would you recommend, is it enough to determine the width of the screen through window.innerWidth
? If so, what width should I start from?
There is another option to use navigator.userAgent
Just if this can be done using JS in a couple of lines, then I would not want to connect some separate library for this task
Answer the question
In order to leave comments, you need to log in
see how it's done using js inside some library and drink this piece to yourself
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question