duskload / react-device-detect

Detect device, and render view according to detected device type.
MIT License
2.81k stars 154 forks source link

Add note about user agent sniffing #182

Closed gpoole closed 2 years ago

gpoole commented 2 years ago

Added a note that outlines the user agent sniffing technique used and suggests alternative approaches for the common case of generally detecting mobile devices. Happy to update it and reword if I've misunderstood the goals of the project or there are other uses I didn't include.

The motivation behind wanting to include a note like this is that I've now had two different junior devs on different projects submit PRs to me that tried to use this library for basic responsiveness and showing different content on mobiles. I think a note will help avoid that confusion.

Fixes #174