Browser Detection in ReactJS

前端 未结 7 1742
甜味超标
甜味超标 2020-12-04 22:20

Is there any way to detect IE browser with React and either redirect to a page or give any helpful message. I found something in JavaScript, but not sure how would I use it

7条回答
  •  情书的邮戳
    2020-12-04 23:01

    This almost broke me, but I found something which seems pretty simple and straight forward, use the vendor name. ie. Google, Apple etc. navigator.vendor.includes('Apple') I hope this helps someone out there.

提交回复
热议问题